🐛 DeckEmptyError - Bug Fixed

Previously, a player could have joined the game with less than 7 cards in case of DeckEmptyError
This commit is contained in:
DO97 2019-06-16 17:56:22 +02:00 committed by GitHub
parent 8e5c714dbf
commit e36f9f8270
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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