Tic-Tac-Toe

Games

About this app

Classic 3×3 Tic-Tac-Toe against the computer, built with pure React (no game engine). How to play You are X and always move first; the computer is O. Click an empty square to place your mark. Get three in a row — across, down or diagonally — to win. A full board with no line is a draw. Use New game to start over.

Features

  • Two difficulties: Easy (the computer picks random squares) and Hard (perfect play with minimax — it never loses). Switching difficulty starts a new game.
  • Score tally of wins, losses and draws, kept separately for each difficulty and saved in localStorage, with a Reset scores button.
  • Move history listing every move of the current game.
  • The winning line is highlighted.
  • Stats: games played, wins, losses, draws, win rate, current and best win streak for each difficulty. Reset stats clears them all, scores included, after a Yes / No confirmation.
  • Sound effects made with the Web Audio API (your move, the computer's move, win, loss and draw), with a 🔊 toggle.
  • Settings: theme (same as the device, light or dark), the difficulty a new session starts on, and sound on or off, all saved in localStorage.

This application can

Show its own pages, and nothing more

Ratings and reviews

0.0
0 review(s)
Only registered users can write reviews