Console game blackjack in Python. Created for educational purposes.
- Clone repository
git clone https://github.com/rubanik00/python_blackjack.git
- Run
python3 main.py
- Play
Blackjack, also known as 21, is a popular card game where the objective is to beat the dealer by having a hand value as close to 21 as possible without exceeding it.
- Blackjack is typically played with one or more standard decks of 52 playing cards.
- Numbered cards (2-10) are worth their face value.
- Face cards (Jack, Queen, King) are each worth 10 points.
- Aces - 11 points or 1 point, if the value exceeds 21.
- Each player is dealt two cards from the deck, typically face-up, while the dealer receives one face-up and one face-down card.
- Players take turns deciding whether to "hit" (take another card) or "stand" (keep their current hand).
- The objective is to get a hand value as close to 21 as possible without exceeding it.
- If a player's hand exceeds 21 points, they "bust" and lose the game.
- If a player's hand equals 21 with their first two cards (an Ace and a 10-value card), they have a "blackjack" and usually win the game.
- If a player's hand is closer to 21 than the dealer's hand without going over, they win the round.
- If the dealer busts and a player hasn't, the player wins.
- The dealer must hit until their hand is worth 17 points or more.
- If the dealer busts, all remaining players win.
- In the case of a tie (push), where a player and the dealer have the same hand value, no money is won or lost.