fixing match revoke
This commit is contained in:
parent
61edbf8419
commit
3502790333
@ -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:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user