๐ฃ Minesweeper
By Just Sparrow
Minesweeper
A single-file Minesweeper rendered in the same picture-book aesthetic as Snake, Watermelon Game, Pencil Hit, and Sudoku (warm dark-brown outlines, pastel fills, rounded board, Fredoka + Jua typography). Covered tiles are soft pastel-green buttons that pop open into a cream field of colourful numbers โ pick a level, dig out every safe tile, flag the mines, and race your best time.
How to Play
- On the start panel choose a level โ Easy, Medium, or Hard โ then tap GAME START.
- The two big buttons under the board switch your tap action: โ๏ธ Dig (default) or ๐ฉ Flag.
- Tap a tile to dig it. The number that appears is how many mines touch that tile (including diagonals); a blank tile auto-opens its whole safe region.
- Switch to ๐ฉ Flag mode (or long-press any tile) to mark a suspected mine. The Mines counter shows how many are left to find.
- Tap an opened number whose flags already match its count to "chord" โ instantly open all its remaining neighbours.
- Clear every safe tile to win. Dig a mine and it's Boom! โ tap Play Again, or ๐ Home for a different level.
Your first dig is always safe โ mines are placed only after you tap, and never under that tile or its neighbours, so you always open a region to start.
Features
Three Difficulty Levels
| Level | Grid | Mines |
|---|---|---|
| Easy | 9 ร 9 | 10 |
| Medium | 12 ร 12 | 26 |
| Hard | 14 ร 14 | 44 |
The grid and glyphs scale to fit the same square board at every size.
Safe First Click
Mines are deferred until your first dig, then scattered everywhere except the tapped tile and its eight neighbours โ so the game always opens with a satisfying flood instead of an instant loss.
Flood-Fill Reveal
Digging a tile with no adjacent mines opens its entire connected zero-region in one tap, bordered by the numbered tiles โ exactly like classic Minesweeper.
Classic Number Colours
Each count gets its own colour (1 blue, 2 green, 3 red, 4 purple, โฆ) over the cream opened tiles, so the board stays readable as it fills in.
Two Input Modes + Long-Press + Chord
- โ๏ธ Dig / ๐ฉ Flag toggle for clean one-handed play.
- Long-press flags a tile in any mode.
- Chord: tap an opened number whose adjacent flags equal its value to clear the rest of its neighbours at once.
Mine Counter & Timer
A live Mines-left counter (total mines minus flags) and a count-up timer sit in the header. Win and the remaining mines auto-flag; lose and every mine is revealed โ with a โ over any tile you flagged by mistake.
Best-Time Persistence
Your fastest clear is stored per level in the browser. Beating it shows a โจ New Best โจ flourish on the win screen.
Sound Effects
All sounds are synthesized on the fly โ no external files.
- Soft thunk when you dig a tile, with a gentle follow-tone on a flood.
- Distinct flag / un-flag ticks and a mode-switch blip.
- A deep boom on a mine, then a descending arpeggio on game over.
- A rising four-note fanfare when you clear the board.
A ๐ / ๐ mute button silences everything. Audio auto-resumes when the page returns from background.
Quality-of-Life Details
Two icon buttons sit below the playfield:
- ๐ / ๐ Mute (bottom-left): Silence all sound.
- ๐ Home (bottom-right): Return to the level-select screen.
Design
- Portrait page (9:16) with a square board โ fits entirely on a phone without scrolling.
- Pastel-green covered tiles with a raised inset-shadow button look that flattens into a cream field when opened โ outlined in the family's warm dark-brown.
- Fully rounded board corners, with a green checkerboard tint on covered tiles for readability.
- Green start / restart buttons (matching the dig tiles) and a yellow flag-mode highlight, with the layered inset shadow for a 3D pressable look.
- Fredoka + Jua font (Google Fonts) for a rounded, child-friendly look.
Tech
- Single HTML file โ no build step, no external assets (except a single Google Fonts link).
- DOM-based grid sized per level, with per-tile pointer handling for tap, long-press, and chord.
- Deferred mine placement for a guaranteed-safe first click, and an iterative flood-fill for zero-region reveals.
- Web Audio API for all sound โ synthesized tones, no audio files.
Loading comments...
Other Codes
No other codes yet