Minesweeper Logic Grid
Use numerical clues to deduce hidden mine locations and clear the board without triggering a detonation. Features mobile flag mode, safe first-click generation, and radar hints.
HOW TO PLAY MINESWEEPER
Rules, Controls & Classic Patterns
- Guaranteed Safe Opening: Click any tile on the grid. Mines are generated after your first click so your opening square and its immediate neighbors are always clear.
- Read the Number Clues: Every revealed number ($1\text{ to }8$) tells you the exact count of mines hidden inside the $8$ surrounding squares (horizontally, vertically, and diagonally).
- Flag Suspected Mines: On desktop, Right-Click a tile to place a red flag (🚩). On mobile or touchscreens, tap the ⛏️ Mode: Dig / 🚩 Mode: Flag toggle button at the top.
- Use Radar Hints: Stuck on a 50/50 guess? Click 💡 Hint (up to 3 times per match) to safely reveal an unflagged safe square.
ALGORITHMIC LOGIC
How Flood-Fill & Constraint Math Work
When you uncover a square with $0$ adjacent mines, our engine runs a recursive Breadth-First Search (BFS) flood-fill algorithm—automatically expanding outward across all connected zero-value cells and their numbered borders.
The 1–2–1 Pattern: Whenever you see a flat wall of unrevealed tiles bordered by 1 - 2 - 1, logic dictates that the mines must sit directly beneath the two 1s, leaving the square beneath the 2 completely safe.