From e36f9f827087ff2b771290447b5e2f8709e2700e Mon Sep 17 00:00:00 2001 From: DO97 Date: Sun, 16 Jun 2019 17:56:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20DeckEmptyError=20-=20Bug=20Fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, a player could have joined the game with less than 7 cards in case of DeckEmptyError --- player.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/player.py b/player.py index e207239..f41ded3 100644 --- a/player.py +++ b/player.py @@ -62,8 +62,7 @@ class Player(object): for _ in range(7): self.cards.append(self.game.deck.draw()) except DeckEmptyError: - for card in self.cards: - self.game.deck.dismiss(card) + self.leave() raise