Skip to content

thecodingdhami/tictactoegame.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Tic-Tac-Toe (D vs S)

A fun, modern, and beginner-friendly Tic-Tac-Toe game built with Python .
Play with your Friend or challenge a Robot ๐Ÿค– that thinks before it moves!


โœจ Features

  • ๐ŸŽฏ Play with Friend or Robot (AI)
  • ๐ŸŒ— Switch between Dark Mode and Light Mode
  • ๐ŸŒ€ Restart the game anytime
  • ๐Ÿ”™ Go Back to select another mode
  • ๐ŸŽจ Beautiful and modern Tkinter UI
  • ๐Ÿ’ก Smart Robot that blocks and wins strategically

๐Ÿ–ผ๏ธ Screenshots

Screenshot


โš™๏ธ How to Run

# Step 1: Clone this repository
git clone https://github.com/yourusername/tic-tac-toe.git

# Step 2: Go to the project folder
cd tic-tac-toe

# Step 3: Run the Python file
python tic_tac_toe.py

๐Ÿง  Game Rules

  • Player D always starts first.
  • Players take turns marking spaces in a 3ร—3 grid.
  • The first to get three marks in a row (horizontally, vertically, or diagonally) wins!
  • If all spaces are filled and no one wins โ€” itโ€™s a tie ๐Ÿค

๐Ÿ“‚ Project Structure

tic-tac-toe/
โ”‚
โ”œโ”€โ”€ tic_tac_toe.py      
โ”œโ”€โ”€ README.md           
โ””โ”€โ”€ assets/             

๐Ÿ“œ License

This project is licensed under the MIT License.
Feel free to use, modify, and distribute it with credit to the author.


๐Ÿ’– Made with Python by thecodingdhami