Skip to content

Latest commit

 

History

History
34 lines (34 loc) · 709 Bytes

README.md

File metadata and controls

34 lines (34 loc) · 709 Bytes

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!