Tic-tac-toe is a game in which players take turns by marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner. The game's AI is developed using the min-max algorithm.
You just have to follow standard JVM rules to run the programme.
First, compile the code by typing command in terminal:
javac tictac.java
then run the tictac.class file by:
java tictac
For every turn, the user has to give the location where he/she want to make his move.
the location must be in this format:
Row Column
and to end the game, you have to type:
end