Skip to content

Shailya777/Black-jack-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Black Jack Card Game (Python)

A text based implementation of the classic “Black Jack” game, written in Python. This project was built to practice object-oriented design, multi-file modularity, and game loop logic.

🎮 Game Overview

Black Jack is a popular card game where the goal is to beat the dealer by having a hand value closest to 21 without exceeding it. Players can “hit” (take another card) or “stand” (keep current hand), with special rules for dealer play, betting chips, and handling busts.

🧩 What This Project Covers

  • Object-Oriented Programming: Card, Deck, Hand, Player, Chips classes.
  • Multi-File Structure: Organized code with separate modules for clarity (e.g., card.py, deck.py, chips.py, utils.py, main.py).
  • Command-Line Interaction: Playable through terminal input/output.
  • Game Logic: Handles shuffling, dealing, hitting, standing, busts, dealer play, betting, and replaying.
  • Pythonic State Control: Proper use of return values and function arguments to manage game flow.

🗂️ File Structure

  • main.py – Main game loop
  • card.py – Card class
  • deck.py – Deck class
  • hand.py – Hand class
  • chips.py – Betting system class
  • constants.py – Global constants
  • utils.py – Helper functions

🛠 How to Run

  1. Clone/download this repo.
  2. Make sure you have Python 3.x installed.
  3. In your terminal, navigate to the project folder and run: python main.py
  4. Follow on-screen prompts to play and bet chips.

✏️ What I Practiced

  • Modular design with multiple files and imports.
  • Managing game state and logic cleanly.
  • Implementing betting and handling edge cases (ace values, busts, repeats).

Created by Shailya Gandhi (https://github.com/Shailya777) as part of my Python learning journey. Feedback and suggestions are welcome!

About

Text Based (CLI) Black Jack Card Game. (Can be Played by One Player and Automated Dealer)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages