fix player leaving in his turn with empty lobby

This commit is contained in:
Alberto Xamin 2020-11-26 17:23:03 +01:00
parent ce506e90ed
commit 41ca3b2747
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2

View File

@ -183,8 +183,9 @@ class Game:
self.players[self.turn].play_turn() self.players[self.turn].play_turn()
def next_turn(self): def next_turn(self):
self.turn = (self.turn + 1) % len(self.players) if len(self.players) > 0:
self.play_turn() self.turn = (self.turn + 1) % len(self.players)
self.play_turn()
def notify_scrap_pile(self): def notify_scrap_pile(self):
print('scrap') print('scrap')