Skip to content

kevinwchen/odin-tic-tac-toe

Repository files navigation

Tic-Tac-Toe Game

This is a tic-tac-toe game made as an exercise to practice working with factory functions and modules for The Odin Project. A live demo of the game can be accessed here.

Both a singleplayer and multiplayer version of the game are available. In the multiplayer version you can pick any unique "marker" for the board. In singleplayer mode the first move (either you or the computer) will always be crosses (X) and the other will be naughts (O).

Due to the zero-sum nature of tic-tac-toe, an unbeatable version of the computer in singleplayer mode is available to play against. This was implemented using a minimax recursion algorithm to determine the move with the best possible outcome.