Skip to content

Nirmalakadali/Tic_Tac_Toe-with-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe Game

Description

This is a simple implementation of the classic Tic-Tac-Toe game using Pygame and published using pybag library and itch.io website. The game allows a player to choose between playing as X or O and competes against an AI opponent.

Features

  • Choose to play as X or O.
  • Play against an AI opponent.
  • Visual representation of the game board.
  • Game over messages indicating the winner or a tie.
  • Option to play the game again.

How to Play

In website

  1. Click this url (Click me)
  2. Click run game in the webiste
  3. Wait for few seconds to load
  4. Choose to play as X or O.
  5. Make your moves by clicking on the desired empty cell.
  6. The AI opponent will take its turn automatically.
  7. The game will announce the winner or a tie when the game is over.
  8. Click "Play Again" to start a new game.

From Code Editor

  1. Download the github repo
  2. Unzip the folder
  3. Run the script by executing python main.py.
  4. Choose to play as X or O.
  5. Make your moves by clicking on the desired empty cell.
  6. The AI opponent will take its turn automatically.
  7. The game will announce the winner or a tie when the game is over.
  8. Click "Play Again" to start a new game.

Requirements

  • Python 3.x
  • Pygame library (pip install pygame)

Instructions for Running the Game

  • From url there is no requirements
  1. Ensure you have Python installed on your system ( For code editor)
  2. Install the required Pygame library by running pip install pygame.
  3. Run the game script using python main.py.

Screenshots

Screenshot 2023-12-16 124112

Thankyou

Releases

No releases published

Packages

No packages published