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):
|
def deal_cards(self, cards_per_player):
|
||||||
random.shuffle(self.card_deck)
|
random.shuffle(self.card_deck)
|
||||||
cs = list(chunks(self.card_deck, cards_per_player))
|
cs = list(chunks(self.card_deck, cards_per_player))
|
||||||
for idx, p in enumerate(self.players):
|
for idx, player in enumerate(self.players):
|
||||||
p.set_cards(cs[idx])
|
player.set_cards(cs[idx])
|
||||||
if len(cs) > len(self.players):
|
if len(cs) > len(self.players):
|
||||||
cc = cs[len(self.players)]
|
cc = cs[len(self.players)]
|
||||||
c = cc[0]
|
c = cc[0]
|
||||||
@ -198,7 +198,8 @@ class WizGame:
|
|||||||
if trump_color not in ["b", "r", "g", "y"]:
|
if trump_color not in ["b", "r", "g", "y"]:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
self.trump_card.color = trump_color
|
self.trump_card = Card(trump_color, 'Z')
|
||||||
|
#self.trump_card.color = trump_color
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def get_prev_player(self):
|
def get_prev_player(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user