Skip to content
⭕️ minimax tic tac toe
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
index.js
package-lock.json
package.json

README.md

Minimax Tic Tac Toe

Try it out: https://wave-tic-tac-toe.herokuapp.com/?board=ox+x+++++

This little app takes a board querystring. board should be a nine character string that represents a tic tac toe board, moving left to right beginning from the top row.

You, human, are x, the computer is o and spaces are represented with +.

The querystring ?board=ox+x+++++ would represent a board that looks like this:

//   o  |  x  |
// ----------------
//   x  |     |
// ----------------
//      |     |

The express server does basic board validation and implements a minimax algorithm in deciding the computer's next move.

What's next

The minimax implementation should rank available moves so that the computer wins in the fewest possible turns.

You can’t perform that action at this time.