Skip to content
/ minimax Public

Simple Tic Tac Toe game using the minimax algorithm.

License

Notifications You must be signed in to change notification settings

moekm/minimax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe in C

A simple console-based Tic Tac Toe (X and O) game written in C. This game offers three different modes:

Mode 1: Player vs. Player

In this mode, you and a friend can play against each other on the same computer, taking turns to place your moves on the grid.

MODE1

Mode 2: Player vs. Bot [Easy]

In this mode, you play against a bot that doesn't really know how to play the game, so it makes random moves.

MODE2

Mode 3: Player vs. Bot [Hard]

In this mode, you play against one of the best algorithms known as miniMax, and the chances of you winning are close to zero.

MODE3


How to Play?

After launching the game and selecting a mode, you will be prompted to select a position on the grid. Select a number between 1 and 9, where 1 represents the first space and 9 represents the last space.


How to Compile and Run

Compiling the game is straightforward:

1 - Install a C compiler, such as GCC

2 - Clone this repository to your local machine

3 - cd into the directory

4 - Compile the code by running:

gcc core.c -o tictactoe

5 - This will create an executable named tictactoe.exe which you can simply double-click to run :)

About

Simple Tic Tac Toe game using the minimax algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages