Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Classic Games Collection

A collection of classic, terminal-based games built entirely in Python. This repository serves as a showcase of foundational Python concepts, including Object-Oriented Programming (OOP), while-loops, user input handling, and standard library usage.

🎮 Games Included

1. Blackjack (21)

A fully playable terminal version of the casino classic. Play against the dealer (computer), place your bets, and try to get to 21 without busting!

  • Features: Betting system, chip tracking, Ace adjustment logic, and dealer AI (hits until 17).
  • Run: python blackjack/blackjack.py

2. Tic-Tac-Toe

The classic 2-player board game. The board is mapped to the numpad for easy, intuitive play.

  • Features: 2-player local pass-and-play, automatic win/tie checking, randomized first-player selection, and input validation.
  • Run: python tic_tac_toe/tic_tac_toe.py

3. War (Card Game)

An automated simulation of the card game War. Two virtual players are dealt half a deck each, and they play their top cards against each other until one player runs out.

  • Features: Automated gameplay loop, complex "War" tie-breaker logic, and deck shuffling.
  • Run: python war/war.py

🛠️ Tech Stack

  • Language: Python 3.x
  • Libraries: random (built-in)
  • Concepts Demonstrated: Classes & Objects, Dictionaries/Tuples, Error Handling (try/except), Procedural Logic.

🚀 How to Run

  1. Clone this repository to your local machine:
    git clone [https://github.com/YourUsername/Python-Classic-Games.git](https://github.com/YourUsername/Python-Classic-Games.git)
    

▶️ Run the Project

Navigate into the project directory:

cd Python-Classic-Games

Run the game of your choice using Python 3:

python <game_name>.py

About

A collection of classic, terminal-based games (Blackjack, Tic-Tac-Toe, and War) built in Python to demonstrate foundational Object-Oriented Programming and game logic.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages