fixing match revoke

This commit is contained in:
Jonas Weinz 2019-04-01 16:25:16 +02:00
parent 61edbf8419
commit 3502790333

View File

@ -131,8 +131,11 @@ class MatchManager(object):
player_b_name=entry['user_b'], json_state=entry['match_state'])
if (not match.game_over):
match.game_over = True
if match.complete_field.__contains__(Match.FIELD_USER_A) and match.complete_field.__contains__(Match.FIELD_USER_B):
# check who is the current player who did not make the move in time:
match.player_won = match.player_b_name if match.is_player_a else match.player_a_name