Right now the dealer continues to ask if you want more cards, even when all 52 cards have been dealt. Only once you have selected all 52 cards and then answer n to the prompt Do you want to continue? (y/n) does it tell you that there are no more cards in the deck. If you select y even when you have all 52 cards, the dealer still keeps going, but this doesn't really make sense.
Make a smarter dealer that knows when the deck is out of cards. For example, it could output something like "No cards left" or "All the cards are gone!" when whole deck is dealt, regardless of whether the user wants to continue or not. Then you can prompt the user if they want to start a new hand, and the deck will be reset.
Right now the dealer continues to ask if you want more cards, even when all 52 cards have been dealt. Only once you have selected all 52 cards and then answer
n
to the promptDo you want to continue? (y/n)
does it tell you that there are no more cards in the deck. If you selecty
even when you have all 52 cards, the dealer still keeps going, but this doesn't really make sense.Make a smarter dealer that knows when the deck is out of cards. For example, it could output something like "No cards left" or "All the cards are gone!" when whole deck is dealt, regardless of whether the user wants to continue or not. Then you can prompt the user if they want to start a new hand, and the deck will be reset.
~estimated 50