Fixed 2 issues:

1. Behavior of game play. New cards should be dealt every round.
2. As a result of 1, check that we have at least 3 cards for next round.
This commit is contained in:
aviyam
2022-01-03 12:42:36 +02:00
parent daea544c5f
commit 5e8b3b2ad2

View File

@@ -95,11 +95,14 @@ class Game:
self.not_done = False
break
if len(self.deck.cards) <= 1:
if len(self.deck.cards) <= 3:
print('You ran out of cards. Game over.')
self.not_done = False
break
self.card_a = self.deck.deal()
self.card_b = self.deck.deal()
if self.money == 0:
self.not_done = False