- Arcade
Minesweeper
Reveal safe cells. Avoid the mines
MINESWEEPER
// HAZARD DETECTION SYSTEM v1.0
> GRID: 9 × 9 / MINES: 10
> ← → ↑ ↓ MOVE CURSOR
> [SPACE]: REVEAL / [F]: FLAG
> CHORD: SPACE ON NUMBER = AUTO-REVEAL
> FIRST REVEAL IS ALWAYS SAFE
PRESS [ENTER] TO INITIATE
- Difficulty
- intermediate
- Grid
- 9 × 9
- Engine
- PixiJS
- TypeScript 72%
- Svelte 18%
- CSS 10%
About
Why I built this
Minesweeper is the game that taught me about flood-fill algorithms when I was 12. Rebuilding it was nostalgic — and surprisingly tricky to get right. The first click must always be safe (you regenerate the board if it hits a mine), chord-clicking on numbers should auto-reveal neighbors, and the cursor-based keyboard navigation had to feel as natural as mouse clicks. It's the only game where the arcade preset's lives system maps to a single life.
Highlights
Tech Stack
Dev Notes
Win detection abuses the arcade preset: lives > 0 at game-over means win (all safe cells revealed), lives === 0 means you hit a mine.
The board is generated lazily — mines are placed after the first click, guaranteeing safety. If the random placement would put a mine there, it regenerates.
Chord-clicking checks if the number of adjacent flags matches the cell's mine count. If so, all unflagged neighbors are revealed — a huge time-saver.