/BlackJack

BlackJack

Primary LanguagePython

Blackjack Game

This is a simple implementation of a Blackjack game in Python.

Description

This Python script allows you to play a game of Blackjack against the computer (dealer). It follows the standard rules of Blackjack, where the goal is to get a hand value as close to 21 as possible without exceeding it. You can place bets, draw cards, and compete against the dealer to win virtual money.

How to Play

  1. Run the script blackjack.py.
  2. Enter your bet amount. You start with $2500.
  3. Follow the prompts to draw additional cards (if desired).
  4. The dealer will draw cards until their hand value is 17 or higher.
  5. The winner is determined based on the hand values. If you win, your bet amount is doubled and added to your total money.

Features

  • Betting System: Place bets with a maximum limit of $2500.
  • Ace Adjustment: Automatically adjusts the value of an Ace card based on the player's hand to prevent busting.
  • Result Calculation: Determines the winner based on the hand values.
  • Money Management: Tracks your total money throughout the game.
  • Simple Interface: Easy-to-understand prompts and messages.

Requirements

  • Python 3.x

Usage

  1. Clone this repository to your local machine.
    git clone https://github.com/yourusername/blackjack.git
  2. Navigate to the project directory.
    cd blackjack
  3. Run the script.
    python blackjack.py

Author