Skip to content

Maelto-svg/TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

TicTacToe - Python Game

This project is a simple implementation of the TicTacToe game in Python.

Requirements

Before playing, ensure that you have Python installed on your system. You can download and install Python from the official website: https://www.python.org/downloads/.

Once Python is installed, you need to install the necessary dependencies. All required libraries are listed in the requirements.txt file.

Installing Dependencies

To install the dependencies, run the following command in your terminal:

pip install -r requirements.txt

How to Play

Once the dependencies are installed, you can start the game by running:

python3 tictactoe.py

Game Modes

You have the option to play in one of the following modes:

Single Player:

Play against the computer with three difficulty levels:

  • Easy: The computer makes random moves.
  • Medium: The computer plays moderately well, with some strategic moves.
  • Impossible: The computer is unbeatable and will always play optimally.

Two Players:

Play against a friend by taking turns on the same device.

Game Rules

The game is played on a 3x3 grid. Two players take turns, one using X and the other using O. Each player selects an empty square on the grid during their turn. The first player to align three of their symbols (horizontally, vertically, or diagonally) wins the game. If all squares are filled and no player has aligned three symbols, the game ends in a draw. Enjoy the game!

About

A simple TicTacToe game in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages