Skip to content

tudohuang/Black-jack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

🎲Blackjack Game🎲

This is a simple implementation of the Blackjack card game in Python. The player plays against the computer's dealer and tries to get a hand value as close to 21 as possible without exceeding it.

Prerequisites 📋

  • Python 3.x

How to Run ▶️

  1. Clone the repository or download the blackjack.py file.

  2. Open a terminal or command prompt.

  3. Navigate to the directory where the blackjack.py file is located.

  4. Run the following command:

    python blackjack.py
    

Rules 🃏

  1. At the beginning of the game, the player is given $100,000 in virtual money.
  2. The player places a bet from their available money.
  3. The player and the dealer are each dealt two cards.
  4. The player's cards are displayed along with their sum.
  5. The dealer's first card is shown, and the sum is hidden.
  6. The player decides whether to add another card or not.
  7. If the player's hand value exceeds 21, they lose the bet.
  8. If the player chooses to stop or their hand value is 21, the dealer reveals their cards.
  9. The dealer keeps drawing cards until their hand value reaches 16 or higher.
  10. If the dealer's hand value exceeds 21 or is lower than the player's hand value, the player wins the bet.
  11. If the player's and dealer's hand values are the same, it's a push (tie).
  12. If the dealer's hand value is higher than the player's, the player loses the bet.
  13. The player's money is updated based on the outcome of the game.
  14. The game continues until the player decides to quit or runs out of money.

Additional Features ➕

The game can be customized and expanded with the following features:

  • Implementing a betting system with different bet amounts.
  • Allowing multiple players to participate.
  • Adding graphical user interface (GUI) elements for a more interactive experience.

Have fun playing! 🎉🎲

About

Classic

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages