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,12 +131,15 @@ class MatchManager(object):
player_b_name=entry['user_b'], json_state=entry['match_state']) player_b_name=entry['user_b'], json_state=entry['match_state'])
if (not match.game_over): if (not match.game_over):
match.game_over = True match.game_over = True
# check who is the current player who did not make the move in time: if match.complete_field.__contains__(Match.FIELD_USER_A) and match.complete_field.__contains__(Match.FIELD_USER_B):
match.player_won = match.player_b_name if match.is_player_a else match.player_a_name
self.update_match(entry['id'], match, False) # 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
self.update_match(entry['id'], match, False)
# delete matches from db: # delete matches from db: