From 82b261c8e5c633efcb5e4d9a764a6251d5249da4 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 17 May 2021 21:22:45 +0200 Subject: [PATCH] better --- backend/bang/game.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/bang/game.py b/backend/bang/game.py index 54cf8e3..9152d93 100644 --- a/backend/bang/game.py +++ b/backend/bang/game.py @@ -161,8 +161,8 @@ class Game: self.notify_event_card() def attack_others(self, attacker: pl.Player): - attacker.pending_action = pl.PendingAction.WAIT self.attack_in_progress = True + attacker.pending_action = pl.PendingAction.WAIT attacker.notify_self() self.waiting_for = 0 self.ready_count = 0 @@ -172,13 +172,13 @@ class Game: self.waiting_for += 1 p.notify_self() if self.waiting_for == 0: - self.attack_in_progress = False attacker.pending_action = pl.PendingAction.PLAY attacker.notify_self() + self.attack_in_progress = False def indian_others(self, attacker: pl.Player): - attacker.pending_action = pl.PendingAction.WAIT self.attack_in_progress = True + attacker.pending_action = pl.PendingAction.WAIT attacker.notify_self() self.waiting_for = 0 self.ready_count = 0 @@ -188,9 +188,9 @@ class Game: self.waiting_for += 1 p.notify_self() if self.waiting_for == 0: - self.attack_in_progress = False attacker.pending_action = pl.PendingAction.PLAY attacker.notify_self() + self.attack_in_progress = False def attack(self, attacker: pl.Player, target_username:str, double:bool=False): if self.get_player_named(target_username).get_banged(attacker=attacker, double=double):