Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

giuseppe998e/tictactoe-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.