Skip to content

Latest commit

 

History

History
46 lines (26 loc) · 548 Bytes

File metadata and controls

46 lines (26 loc) · 548 Bytes

Tic Tac Toe

This is an implementation of the minimax algorithm for solving tic-tac-toe. This guarantees that the computer will never lose.

Example

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 

Running

To run the program, compile TicTacToe.java and run the class file:

javac TicTacToe.java
java TicTacToe

License

This project is licensed under the terms of the MIT license.