Skip to content

jigneshis/tic-tac-toe-terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Tic Tac Toe (Terminal Edition)

A simple 2-player Tic Tac Toe game built with Python. This runs directly in the terminal and is perfect for learning or playing with friends!

📦 Features

  • Classic 3x3 Tic Tac Toe game
  • Two-player mode (X vs O)
  • Input validation and error handling
  • Clear win and tie detection

▶️ How to Run

  1. Clone this repository:
    git clone https://github.com/your-username/tic-tac-toe-terminal.git
    cd tic-tac-toe-terminal
  2. Run the game: python3 tic_tac_toe.py

🎯 How to Play The board is a 3x3 grid represented with row and column indices from 0 to 2.

Players take turns entering their move as two numbers: row col.

Example input:

java Copy Edit Player X, enter row and col (0 2): The cell must be empty to place your symbol.

First to complete a line horizontally, vertically, or diagonally wins!

If the board fills up with no winner, it ends in a tie.

📸 Screenshot markdown Copy Edit 🎮 Tic Tac Toe (2 Players) | |

| |

| |

Player X, enter row and col (0 1): 🛠️ Requirements Python 3.x

No additional libraries needed.

🧑‍💻 Author Jignesh Wadhwani

About

a tic-tac-toe game for timepassing and to flex in school

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages