This project features:
- Player Vs Player (Local)
- Player Vs Bot (MiniMax Algorithm)
- Player Vs Player (Online)
Round 1: X starts
Round 2: O starts
Starting player is alternated this way
Bot is always X and starts first in round 1, then starting player is alternated
The bot is made using Minimax Algorithm and always plays the perfect move resulting in a win or draw on the highest difficulty, It evaluates every possible move and chooses the the move with the highest score, assuming the opponent will play optimally
To avoid using a backend server, the data is sent throug PubNub channels (Rooms)
Each player has a unique username and can choose to create or join a room with a randomly generated 5 Letter (Upper and Lower Case) room code
The player who creates the room is always X and is the starting player in the first round