fix bluffing again
This commit is contained in:
parent
95fe601f6d
commit
bc9c057d57
1 changed files with 8 additions and 4 deletions
12
player.py
12
player.py
|
@ -86,12 +86,16 @@ class Player(object):
|
|||
self.logger.debug("Matching!")
|
||||
playable.append(card)
|
||||
|
||||
# You may only play a +4 if it's the only card you can play
|
||||
self.bluffing = bool(len(playable) - 1)
|
||||
# You may only play a +4 if you have no cards of the correct color
|
||||
self.bluffing = False
|
||||
for card in playable:
|
||||
if card.color == last.color:
|
||||
self.bluffing = True
|
||||
break
|
||||
|
||||
# You may not play a chooser or +4 as your last card
|
||||
if len(self.cards) == 1 and (self.cards[0].special == c.DRAW_FOUR
|
||||
or self.cards[0].special == c.CHOOSE):
|
||||
if len(self.cards) == 1 and (self.cards[0].special == c.DRAW_FOUR or
|
||||
self.cards[0].special == c.CHOOSE):
|
||||
return list()
|
||||
|
||||
return playable
|
||||
|
|
Loading…
Reference in a new issue