This is an implementation of the minimax algorithm for solving tic-tac-toe. This guarantees that the computer will never lose.
Welcome to Tic Tac Toe.
1 2 3
4 5 6
7 8 9
Enter your move (1 - 9): 2
O X 3
4 5 6
7 8 9
...
Computer Wins:
O X X
X X 6
O O O
To run the program, compile TicTacToe.java
and run the class file:
javac TicTacToe.java
java TicTacToe
This project is licensed under the terms of the MIT license.