An open API service indexing awesome lists of open source software.

https://github.com/anishvedant/tic-tac-toe

A modern implementation of the classic Tic Tac Toe game built with Python and Pygame.
https://github.com/anishvedant/tic-tac-toe

classic-game educational-project game-development graphics interactive-game open-source pygame pygame-application python-3 python-game python3 tic-tac-toe

Last synced: 8 months ago
JSON representation

A modern implementation of the classic Tic Tac Toe game built with Python and Pygame.

Awesome Lists containing this project

README

          

# Tic-Tac-Toe Game

Welcome to the Tic Tac Toe Game repository! This project is a modern implementation of the classic Tic Tac Toe game, built using Python and Pygame. It features a graphical interface with custom images for the X and O symbols, and provides a simple yet engaging way to play the game against another player on the same machine.

## Features

- **Graphical Interface:** The game includes a visually appealing interface with custom images for X and O.
- **Win Detection:** The game automatically detects wins and highlights the winning line.
- **Draw Detection:** The game detects when there is no possible winner and declares a draw.
- **Easy Reset:** The game automatically resets after a short delay when a win or draw occurs.

## Screenshots

| ![Game Opening.jpg](https://github.com/anishvedant/Tic-Tac-Toe/blob/main/Screenshots/Tic%20Tac%20Toe_2.png)
|:--:|
| ***Game Opening*** |

| ![In-game Screenshot.jpg](https://github.com/anishvedant/Tic-Tac-Toe/blob/main/Screenshots/Tic%20Tac%20Toe_1.png)
|:--:|
| ***In-game Screenshot*** |

| ![In-game Screenshot.jpg](https://github.com/anishvedant/Tic-Tac-Toe/blob/main/Screenshots/Tic%20Tac%20Toe_1.png)
|:--:|
| ***In-game Screenshot*** |

## Getting Started

### Prerequisites

- Pygame

### Installation

1. Clone the repository:
```bash
git clone https://github.com/anishkumarvedant/tic-tac-toe-game.git
```

2. Change into the project directory:
```bash
cd tic-tac-toe-game
```

3. Install the required packages:
```bash
pip install pygame
```

### Running the Game

To start the game, simply run the `tic_tac_toe.py` script:
```bash
python3 tic_tac_toe.py
```

### How to Play

The game opens with a splash screen and then displays the game board. Players take turns clicking on the grid to place their X or O. The game will automatically detect a win or draw and reset after displaying the result.

## Contributing

Contributions are welcome! Feel free to fork the repository and submit pull requests with your improvements and bug fixes.

## License

This project is licensed under the MIT License. See the `LICENSE` file for details.

## Disclaimer

This game is for educational purposes and personal enjoyment. Ensure you have the appropriate rights to use the graphic and sound assets included in the game.

---