forked from test/mau_mau_bot
more stable first-card drawing
This commit is contained in:
parent
73365f49fc
commit
a02813477a
1 changed files with 3 additions and 5 deletions
8
game.py
8
game.py
|
@ -37,12 +37,10 @@ class Game(object):
|
||||||
|
|
||||||
def __init__(self, chat):
|
def __init__(self, chat):
|
||||||
self.chat = chat
|
self.chat = chat
|
||||||
self.deck = Deck()
|
self.last_card = None
|
||||||
self.last_card = self.deck.draw()
|
|
||||||
|
|
||||||
while self.last_card.special:
|
while not self.last_card or self.last_card.special:
|
||||||
self.deck.dismiss(self.last_card)
|
self.deck = Deck()
|
||||||
self.deck.shuffle()
|
|
||||||
self.last_card = self.deck.draw()
|
self.last_card = self.deck.draw()
|
||||||
|
|
||||||
self.logger = logging.getLogger(__name__)
|
self.logger = logging.getLogger(__name__)
|
||||||
|
|
Loading…
Reference in a new issue