Skip to content

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

License

Notifications You must be signed in to change notification settings

anishvedant/Tic-Tac-Toe

Repository files navigation

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
Game Opening
In-game Screenshot.jpg
In-game Screenshot
In-game Screenshot.jpg
In-game Screenshot

Getting Started

Prerequisites

  • Pygame

Installation

  1. Clone the repository:

    git clone https://github.com/anishkumarvedant/tic-tac-toe-game.git
  2. Change into the project directory:

    cd tic-tac-toe-game
  3. Install the required packages:

    pip install pygame

Running the Game

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

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.