/TicTacToe

A simple python program with pygame module for visualisation

Primary LanguagePython

Google's Tic-Tac-Toe Game with clean UI

Presenting a Python implementation of the timeless game of Tic-Tac-Toe, enhanced with a user-friendly graphical interface created using the Pygame library. This interactive program offers a platform for two players to engage in strategic battles, taking turns to make their moves on the classic 3x3 grid.

The intuitive graphical user interface adds an engaging dimension to the traditional Tic-Tac-Toe experience. Players can seamlessly navigate through the game, placing their Xs and Os with a simple click, fostering a dynamic and enjoyable gaming atmosphere.

The gameplay follows the familiar rules of Tic-Tac-Toe, where the objective is to create a row of three symbols either horizontally, vertically, or diagonally. The Pygame library facilitates smooth interactions, ensuring a responsive and immersive gaming experience for the players.

With this implementation, the essence of Tic-Tac-Toe is elevated by the combination of Python's logic and Pygame's graphical capabilities. Whether you're a seasoned player looking for a nostalgic experience or a newcomer exploring the world of classic games, this Python-based Tic-Tac-Toe with Pygame promises hours of strategic fun for two players.

Features

  • Two-player gameplay.
  • Clear and user-friendly interface.
  • Easy-to-use controls:
    • Click on an empty square to place your symbol (X or O).
    • Press "R" to restart the game.
    • Press "ESC" to quit the game.
  • Winning line visualization when a player wins.
  • Game board grid with lines.

How to Play

  1. Run the game by executing the main.py script.
  2. The game starts with Player 1 (X) making the first move.
  3. Players take turns clicking on empty squares to place their symbol.
  4. The game ends when one player wins or when the board is full (a draw).
  5. To restart the game, press the "R" key.
  6. To quit the game, press the "ESC" key.

Requirements

  • Python 3.x
  • Pygame library

Installation and Usage

  1. Clone this repository to your local machine:

    git clone https://github.com/saikumaradapa/TicTacToe.git
    
    
    
    

Project Demo Video

TicTacToe.Project.Demo.mp4

Screenshots

Screenshot (111)

Screenshot (112)