From a02813477a39808a8d35e1dc4289dc1ec070cdc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Sat, 21 May 2016 18:56:27 +0200 Subject: [PATCH] more stable first-card drawing --- game.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/game.py b/game.py index 63c5edb..cbfc575 100644 --- a/game.py +++ b/game.py @@ -37,12 +37,10 @@ class Game(object): def __init__(self, chat): self.chat = chat - self.deck = Deck() - self.last_card = self.deck.draw() + self.last_card = None - while self.last_card.special: - self.deck.dismiss(self.last_card) - self.deck.shuffle() + while not self.last_card or self.last_card.special: + self.deck = Deck() self.last_card = self.deck.draw() self.logger = logging.getLogger(__name__)