This is a game played on a 3x3 matrix, where 2 players put 'X' and 'O' in an alternating fashion. The player to secure 3 consecutive squares (any row, column or diagonal) as their symbol wins immediately. If all 9 squares are occupied and no one has 3 consecutive squares, the game is tied.
Download the C++ file. Open the folder containing the file on terminal and run the following commands:
g++ TicTacToe.cpp -o TTT
./TTT
Enjoy the game!