fix a bug when 'Z' was trump card
This commit is contained in:
parent
dc87897b77
commit
fb638a60dc
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user