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

https://github.com/nirmalakadali/tic_tac_toe-with-ai

I bet you can't win against AI
https://github.com/nirmalakadali/tic_tac_toe-with-ai

ai minmax-algorithm

Last synced: 3 months ago
JSON representation

I bet you can't win against AI

Awesome Lists containing this project

README

        

# 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](https://nirmalakadali.itch.io/tic-tac-toe-with-ai))
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](https://github.com/Nirmalakadali/Tic_Tac_Toe-with-AI/assets/99960001/ca22d159-9a09-4264-9649-af26f2bb2bf8)

Thankyou