A Tic-Tac-Toe game where the user can play with a friend, with a bot or watch 2 bots play against each other.
The bot moves strategically, its opponent can either lose or draw.
The game starts in Player vs Player mode. The top corners show the names and scores for Player X and Player O. You can change the color themes by clicking on the swatches on the bottom left corner.
Select one of 3 game modes:
- Player vs Player (the default mode) - have full control over placing the marks on the board.
- Player vs Master – play against an unbeatable bot. Choose the mark that the bot will play with. The ? option will assign a random mark for Master on each replay.
- Master vs Master – watch two bots play.
You can also click on the player names to change them.
Behind the scenes, each cell in the grid has an associated code (shown in image). 3 matching digits from different codes identify a winning condition.
Master uses these codes to understand the state of the board.
The optimal tic-tac-toe strategy used to create Master’s move decisions is described here.
Prerequisites: JRE - click here for installation steps. Make sure to set the JAVA_HOME system variable.
JavaFX - click here
Put the the path to the lib folder in the compile
and run
scripts.
Download and unzip the project.
Run Command:
./compile
./run