In case the last player to be waited on leaves the game, move from top of round to bottom of round immediately

This commit is contained in:
Juhani Krekelä 2019-07-20 22:23:57 +03:00
parent ba3f7ebaea
commit 23b54056c2
1 changed files with 4 additions and 1 deletions

View File

@ -985,10 +985,13 @@ def game(send, notice, voice, devoice, get_event):
if players[nick] is not czar:
send_cards(nick)
while len(choosers) > 0:
while True:
# Make sure that if a chooser leaves, they won't be waited on
choosers = [i for i in choosers if i in players.values()]
if len(choosers) == 0:
break
if len(players) < 2:
send('Not enough players to continue (needs at least two), quitting game')
return no_game