Skip to content

A very simple Tic Tac Toe game written in C++ which you control the X's and the AI controls the O's. The AI had never lost a single game in my tests.

Notifications You must be signed in to change notification settings

ProgrammerVic/TicTacToe-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Tic Tac Toe-AI

A very simple Tic Tac Toe game written in C++ that uses a little bit of brute force which you control the X's and the AI controls the O's. The AI had never lost a single game in my tests.

Files

It contains 2 files:

  • "README.md", the introduction file.
  • "TicTacToeAI.cpp", the game with AI.

UI

Its UI is very simple. It's like this:

...
...
...
Enter the location you want to put your X (1-9): 1
X..
.O.
...
Enter the location you want to put your X (1-9): 3
XOX
.O.
...
Enter the location you want to put your X (1-9): 8
XOX
.O.
.XO
Enter the location you want to put your X (1-9): 4
XOX
XO.
OXO
Enter the location you want to put your X (1-9): 6
XOX
XOX
OXO
It's a draw!

About

A very simple Tic Tac Toe game written in C++ which you control the X's and the AI controls the O's. The AI had never lost a single game in my tests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages