This repository contains a straightforward command-line Blackjack game implemented in Python. Test your luck and skill against a computer dealer!
- Simulates a single-player blackjack game against a computer dealer.
- Basic blackjack rules implemented:
- Automatic "Blackjack" recognition.
- Handling of Ace as 1 or 11 based on the current hand.
- Dealer logic to stop drawing at 17 or higher.
- Interactive prompts for player decisions.
- Randomized card draws for a fair game.
- Objective: Get closer to 21 than the dealer without exceeding 21.
- Card Values:
- Number cards are worth their face value.
- Face cards (Jack, Queen, King) are worth 10.
- Aces can count as 1 or 11.
- Gameplay:
- Player starts with two cards, and the dealer gets two cards (one hidden).
- The player can "hit" to draw additional cards or "stand" to keep their hand.
- If either the player or dealer exceeds 21, they "bust" and lose.
- The dealer draws until reaching at least 17.
- Clone the repository:
git clone https://github.com/BhavikJaviya24/blackjack_python_project.git cd blackjack_python_project
- Ensure you have Python 3 installed.
- Run the game:
python main.py
- Follow the on-screen instructions to play:
- Type
'y'
to draw another card. - Type
'n'
to end your turn.
- Type
- Enjoy the game! 🎉
- Python 3.x: Core programming language.
- Add betting and scoring systems.
- Implement a graphical user interface (GUI).
- Include a multiplayer option.
- Add sound effects and animations for a more immersive experience.
Contributions are welcome! Feel free to:
- Fork this repository.
- Submit a pull request with improvements or bug fixes.