WMines — A Minesweeper Clone
A small Minesweeper clone, compiled to WebAssembly and playable directly in the browser below. Clear every cell that isn't a mine to win.
History
Games built around revealing a hidden grid while avoiding mines go back to 1960s and 70s mainframes; the Amiga and ZX Spectrum title Mined-Out (1985) is often cited as a direct ancestor of the modern format. The version most people know, though, came from Microsoft: Robert Donner and Curt Johnson wrote it in 1989–90 to ship with Windows 3.1, originally as a way to get people comfortable with mouse clicks — left-click to reveal, right-click to flag — at a time when a mouse-driven interface was still new to most users.
Minesweeper stayed a default part of Windows for over two decades before Microsoft dropped it from the base install with Windows 8 in 2012, replacing it with an ad-supported store app. By then it had already been cloned onto essentially every platform and language that can draw a grid and handle a click — this WebAssembly version included.
The rules turn out to be more interesting than they look: deciding whether a given board of numbers and flags is even consistent with some placement of mines is NP-complete, a result proven by mathematician Richard Kaye in 2000. The game people casually click through on a coffee break is, underneath, an open combinatorial puzzle.