leotaozeng / blackjack

A basic terminal-based blackjack game written in Python.
0 stars 0 forks source link

Add a Split Feature #5

Closed leotaozeng closed 4 months ago

leotaozeng commented 4 months ago

To add a split feature for the player in the Blackjack game, we need to make several modifications.

  1. The split option is available if the player's initial two cards have the same rank.
  2. When a player splits, they will create two separate hands, each starting with one of the original cards, and continue playing each hand independently.
leotaozeng commented 4 months ago
  1. Check for Splits: After dealing the initial hands, check if the player can split.
  2. Modify the Player's Hand Structure: Allow the player to have multiple hands (in case of splits).
  3. Handle Split Logic: If the player decides to split, create two hands from the initial hand and deal an additional card to each hand.
  4. Adjust the Game Flow: Ensure the game logic handles multiple hands for the player.