/tictactoe-js

Another TicTacToe script written in JS

Primary LanguageJavaScriptGNU Lesser General Public License v3.0LGPL-3.0

Another TicTacToe Script (that uses MiniMax algorithm)

Tic-tac-toe (American English), noughts and crosses (Commonwealth English), or Xs and Os is a paper-and-pencil game for two players, X and O, who take turns 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.

This script uses the MiniMax algorithm to calculate the moves of the computer, it is practically impossible to beat it.

Minified version of the code is available in the "example" folder.

P.S. :: At the moment, the only implemented "difficulty" is the "impossible" one.