Back to projects

Tactic Tac Toe

A local two-player React game with editable names, a move log and a rematch button.

Tactic Tac Toe project screenshot

What it does

The board, turn indicator and winner are all derived from the same move history.

Decisions

Store moves, derive the board
Only the turn list and player names need React state. Each render rebuilds the board from the recorded moves.
Disable occupied squares
Each cell is a button that becomes disabled after a player chooses it.
Check fixed win conditions
A helper compares the board against the eight possible winning lines and declares a draw when nine turns have no winner.

Full notes

More on the implementation and challenges.

Next project

Flavor Hub

A responsive restaurant website with an interactive menu and dark mode.

Working on something similar? Get in touch.