/tic-tac-toe

Tic tac toe game 🎮 🕹

Primary LanguageJavaScript

Tic tac toe game

This is in browser version of the famous tic-tac-toe game.

Live demo

This repo has 2 branches :

  • master
  • refactor-to-classes: this branch has all the functionality as code in master, but it is refactored to classes (player, board and game class)

Overview

Features:

  1. The game has 2 options:

    • play against computer (unbeatable)
    • play against friend
  2. Players can choose marks (either X or O)

  3. Minimax algorithm is used to make game impossible to win, when played against computer. In the best case, player can draw.