Skip to content

Ratcoder/minimax-tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Java implementation of minimax for solving tic-tac-toe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages