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.