From fb638a60dcb3010b9284d6083775912a14818036 Mon Sep 17 00:00:00 2001 From: Stefan Rupp Date: Fri, 1 May 2020 17:14:01 +0200 Subject: [PATCH] fix a bug when 'Z' was trump card --- wiz_game.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wiz_game.py b/wiz_game.py index 6affb6b..2ca616a 100644 --- a/wiz_game.py +++ b/wiz_game.py @@ -125,8 +125,8 @@ class WizGame: def deal_cards(self, cards_per_player): random.shuffle(self.card_deck) cs = list(chunks(self.card_deck, cards_per_player)) - for idx, p in enumerate(self.players): - p.set_cards(cs[idx]) + for idx, player in enumerate(self.players): + player.set_cards(cs[idx]) if len(cs) > len(self.players): cc = cs[len(self.players)] c = cc[0] @@ -198,7 +198,8 @@ class WizGame: if trump_color not in ["b", "r", "g", "y"]: return False else: - self.trump_card.color = trump_color + self.trump_card = Card(trump_color, 'Z') + #self.trump_card.color = trump_color return True def get_prev_player(self):