This Minesweeper project takes its visual cues from the Windows XP classic. The board uses HTML elements and CSS, while JavaScript handles the game’s rules.

Reveal an empty region
When a player clicks a cell with no neighbouring mines, the reveal should spread through connected empty cells. The numbered cells around that region are revealed too, without exposing the mines.
The operation can be expressed as a flood fill. I used an iterative traversal with a queue rather than a chain of recursive calls. This keeps the region’s depth from being limited by the call stack.
A board made of HTML elements
Leaving Canvas out makes it possible to inspect cells directly in the browser’s developer tools. The repository shows how each interaction connects to the game state.