Little secrets · 01
Your first click gets a second chance.
A first move should be an invitation. In our Minesweeper, even a click on a mine gets one.
The board is already there before you touch it: 81 cells, ten mines, one deterministic seed. If the first cell you reveal contains a mine, our core moves that mine to the first empty cell in row order. Then it counts the neighboring mines again.
You get a safe first cell. You do not get a guaranteed empty opening, or a guarantee that every later move can be solved without guessing.
Make the mine move.
This inspection view deliberately shows every mine. The outlined cell starts with a mine in it. Press the button to send that exact click through the WebAssembly core used by the game.
Inspection view · all mine locations visible · our actual game engine
Two positions change. Ten mines remain.
The clicked cell loses its mine; another cell gains one. The total stays the same. This policy is deterministic, so a replay records the original seed and the click, rather than saving a second board.
// Excerpt from our cores/minesweeper.c
cells[index] &= ~MINE;
for (int target = 0; target < board_width * board_height; ++target) {
if (target != index && !(cells[target] & MINE)) {
cells[target] |= MINE;
break;
}
}
count_neighbors();
Source: our original-authored ms_reveal function in cores/minesweeper.c. We test first-click safety, mine totals and neighbor counts across 3,000 seeds. An original Windows executable is still needed to compare its relocation policy with ours.