This tic-tac-toe game runs in terminal. The game has a player vs player mode and a player vs computer mode.
The computer vs player has three different difficulty modes: EASY, MODERATE & DIFFICULT (the main focus).
-
In EASY mode, the COMPUTER places the marking randomly
-
In DIFFICULT mode, the COMPUTER has few predefined moves, followed by the core algorithm which helps it for decision making. Thus making it impossible to defeat.
-
In MODERATE mode, the core algorithm, makes decision without any predefined moves, making the game random and playful.
NOTE: If you run this code in windows do replace: system("clear"); command with: system("cls");
(this is used to clear the terminal)