Skip to content
🃏 Classic1990MicrosoftEASY

Minesweeper rebuild deck

EASY

Nothing is hard — the only rule that matters is generating the mines after the first reveal rather than before it, and that is a two-line reordering.

You will get essentially the whole thing.

The canonical first project for a coding agent. It is small enough to hold in one context window, the rules are unambiguous, and the one genuinely tricky part — safe first click — is a two-line reordering that agents get right when you tell them to. If a model cannot do this, do not trust it with anything else on this list.

Difficulty
EASY · 1 of 5
First playable
An evening
The original
1 team-years
Released
1990 · Classic
Genre
Puzzle
The one-shot build prompt
Build Minesweeper as a single self-contained HTML file. No build step, no dependencies.

Requirements:
- Three difficulties: Beginner 9x9/10 mines, Intermediate 16x16/40, Expert 30x16/99, plus a custom option.
- First click is ALWAYS safe: generate the mine layout after the first reveal, excluding that cell and its eight neighbours. This is the single most important rule — get it right before anything else.
- Flood-fill reveal for zero-adjacency cells, iterative not recursive, so a 30x16 board cannot blow the stack.
- Left click reveals, right click cycles flag then question mark. Chording: clicking a satisfied number reveals its unflagged neighbours.
- The classic number colours: 1 blue, 2 green, 3 red, 4 navy, 5 maroon, 6 teal, 7 black, 8 grey.
- Timer, mine counter, and a face button that resets and shows surprise on mousedown, dead on loss, sunglasses on win.
- Persist best times per difficulty in localStorage.
- Keyboard support: arrow keys move a focus ring, Space reveals, F flags.

Definition of done: I can win an Expert game with chording and my time is saved.
What you lose
  • Nothing. This is the one game where the clone is the original
  • The specific Windows 3.1 bevel that your brain associates with skiving off work
  • Decades of accumulated speedrun infrastructure and verified leaderboards
What to steal

Hidden state generated only when observed

Everybody knows the rule that the first click is safe. The idea worth having is the general one: hidden state does not need to exist until somebody looks at it, provided what you then generate stays consistent with everything already shown. It costs you a small constraint solver and buys you a world that cannot be unfair.

ScopeA weekend— build just this, not the game

Build a grid whose hidden contents are not decided until they are observed. Single self-contained HTML file, DOM or Canvas 2D, no build step.

- A 9x9 grid holding ten hidden hazards. Revealing a cell shows a count of hazards among its eight neighbours.
- Nothing is generated up front. Maintain a constraint set: every revealed count, plus every cell known safe. When the player reveals a cell, enumerate assignments of the remaining hazards over the frontier that satisfy all existing constraints, pick uniformly at random from those in which the clicked cell is safe, and commit only what this reveal exposes.
- If no consistent assignment leaves the clicked cell safe, it genuinely is a hazard and the player loses fairly.
- A corner readout showing the live count of consistent assignments, so the state collapsing is visible as you play.
- Enumerate over frontier cells only, place the interior at random, and keep a click under 50 ms.

Definition of done: the readout shrinks as I reveal, no opening click is ever fatal, and playing the same opening sequence twice produces two different boards.
Make it different

Not a clone — Minesweeper re-themed and cut down to something you can finish. The angle is the important reel: it is what turns a project into a weekend. 5,880 ways to land.

Jianghu Turn Order

Minesweeper, but turn-based instead of real-time, set in a wuxia martial world. Rendered in flat vector minimalism.

Themea wuxia martial world
Angleturn-based instead of real-time
Lookflat vector minimalism
Build a browser game called "Jianghu Turn Order".

The pitch in one line: a puzzle in the spirit of Minesweeper, but turn-based instead of real-time, set in a wuxia martial world.

WHAT THIS IS
Take the SHAPE of Minesweeper — its core loop, and whatever makes that loop good — and rebuild it as your own game in a different world at a smaller scope. Use your own names, art and audio, which you want anyway: a reskin of somebody else's game is less interesting than a new one that works the same way.

THE ANGLE — this is the important constraint, honour it above everything else
Turn-based instead of real-time. Time only advances when the player acts. Removes every timing, netcode and animation-blending problem and turns reflexes into decisions.
This is what makes the project finishable. If a decision would push the scope back towards the original's, take the smaller option every time.

THE THEME
A wuxia martial world. Movement is the fantasy — rooftops, bamboo and impossible leaps — and honour is a mechanic with teeth.
The theme is not a coat of paint. Let it change what the mechanics mean — a reload, a health pack and a locked door should all be things that make sense in this world and nowhere else.

LOOK
Flat vector minimalism. Pure geometry, no textures, three colours plus white. All feedback carried by motion and scale rather than detail.

REQUIREMENTS
- Runs in a browser with no build step. Canvas 2D unless the angle genuinely requires 3D, in which case three.js.
- Fixed-timestep update loop with interpolated rendering, so it behaves the same at 60Hz and 144Hz.
- Every tuning constant in one CONFIG object at the top, exposed as live sliders in a debug panel. You will find the feel by dragging those, not by prompting.
- All content — levels, entities, balance numbers — in JSON or plain data files, never inline in the logic.
- Audio generated with the Web Audio API rather than asset files.
- Respect prefers-reduced-motion: keep the fades, drop the shake and the parallax.

BUILD ORDER
1. The core loop with placeholder rectangles, at the reduced scope the angle demands. No theme, no art, no audio. Make it fun as rectangles first.
2. The angle's consequences. Cutting to bots, or to turn-based, or to one level changes the design rather than just shrinking it — find out how and rewrite step 1.
3. The theme, as content and data.
4. The look, applied last as a rendering layer over a game that already works.

Start by writing a one-page plan: the core loop, what the angle removes and what that frees you to do properly, and what you are deliberately leaving out. Wait for me to approve it before writing code.
Prior art — read before you build

Half the time one of these already does what you wanted, and the other half it saves you a week of solving a problem someone documented in 1997.

Did you build it?
0Share on X

One count per game. No account — it is tied to a salted hash of your IP, which is not stored in a form anyone can reverse. Every build adds 1 team-years to the counter on the homepage.

Questions

How hard is Minesweeper to rebuild with an AI agent?

Yes — every game is buildable at some scope. The question is how hard, and Minesweeper is EASY (1 of 5). You will get essentially the whole thing. Nothing is hard — the only rule that matters is generating the mines after the first reveal rather than before it, and that is a two-line reordering. Reckon on an evening to something you can actually play — not to something that matches the 1 team-years Microsoft spent.

What makes Minesweeper hard to rebuild?

Nothing is hard — the only rule that matters is generating the mines after the first reveal rather than before it, and that is a two-line reordering. That is why it sits at EASY rather than a tier either side of it. If you want the idea without the project, the transferable part is hidden state generated only when observed — a weekend of work.

How long does it take to build a Minesweeper clone?

Wrong question, and it is worth saying why. Nobody rebuilds Minesweeper — the original took Microsoft on the order of 1 team-years, released in 1990 on Classic. What you can do is reach something playable and genuinely yours in about an evening, and then keep going for as long as it stays interesting. Any figure that claims otherwise is measuring a prototype and calling it a game.

What do I lose by building my own Minesweeper?

Nothing. This is the one game where the clone is the original. The specific Windows 3.1 bevel that your brain associates with skiving off work. Decades of accumulated speedrun infrastructure and verified leaderboards. Those are the parts a prompt will not hand you.

Which AI coding agent should I use to build it?

Any of Claude Code, Codex or Cursor will handle this prompt. Paste it as your first message, let the agent scaffold the project, then iterate on feel — the second, third and tenth prompts are where a game actually gets good. Work in an empty folder or a fresh git branch so you can throw it away cheaply.

Get the next game

One email when new games go on the list. No other reason to email you, ever.