This is a simple implementation of the classic game of Tic Tac Toe, also known as Noughts and Crosses. The game is played on a 3x3 grid where two players take turns marking either an 'X' or an 'O' in an empty cell of the grid. The first player to get three of their marks in a row (horizontally, vertically, or diagonally) wins the game. If all the cells are filled and no player has won, then the game is a draw.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Python 3.x tkinter (a Python GUI library)
- Clone the repository to your local machine:
git clone https://github.com/adel-alaa-dp/tic-tac-toe.git
pip install tkinter
- Navigate to the root directory of the project:
cd tic-tac-toe
- Run the game:
python tic_tac_toe.py
Click on an empty cell on the grid to mark it with your symbol ('X' or 'O'). Try to get three of your symbols in a row (horizontally, vertically, or diagonally) before your opponent does. If a player gets three in a row, they win the game. If all cells are filled and no player has won, the game is a draw.
- Created by: @Adel Alaa
This project was inspired by the classic game of Tic Tac Toe. Thanks to the tkinter library for providing an easy way to create a GUI for the game.