Browser gameeasy

Minesweeper in the browser

The classic game with a pure, seedable rules engine, flood fill, chording, and mouse, touch and keyboard controls.

Suggested effort
~3h focused work
Window
24 hours
Starts from
An empty repo
Stack
Your choice
Sign in to start this build →

Opens in a new tab. The clock starts when you press Start inside the environment, not before, and your workspace is kept while you step away.

Time window 24 hours. Suggested effort about 3 hours.

Context

Build the classic Minesweeper as a polished browser game. The interesting part is a clean separation between the game rules and the rendering, so the rules can be tested without a browser.

Core requirements

  • Beginner (9x9, 10 mines), Intermediate (16x16, 40) and Expert (30x16, 99) boards.
  • The first click is always safe (mines are placed after it, never under it).
  • Revealing an empty cell flood-fills its zero-neighbour region.
  • Right-click (and long-press on touch) toggles a flag; a mine counter shows mines minus flags.
  • Chording: clicking a revealed number with the right number of adjacent flags reveals its other neighbours.
  • Win and loss detection, a timer, and a restart button.

Acceptance criteria

  • The game engine is a pure module (no DOM) with a seedable random generator, so a game can be replayed exactly.
  • Unit tests cover first-click safety, flood fill, chording, win and loss.
  • Works with mouse, touch and keyboard (arrow keys to move, Space to reveal, F to flag).
  • The Expert board stays responsive (no visible lag on a flood fill).

Stretch goals (optional)

  • Best times per difficulty saved in localStorage.
  • A "no guessing" generator that only produces boards solvable by logic.
  • Accessible announcements of game state for screen readers.

Constraints

  • Any front-end approach: plain TypeScript, React, Svelte or a canvas. No game engines.

Deliverables (every project)

  • Source code committed in this repository (the grader diffs against the first commit).
  • README.md that replaces the stub, with: how to install, run and test it (copy-pasteable commands); the decisions and trade-offs you made; what you would do next with more time; and a short note on how you used the AI agent (what you delegated, what you checked or rewrote).
  • Automated tests that run with a single command (npm test, pytest, go test ./... or cargo test).
  • No secrets in the repository. Anything configurable reads from environment variables with safe defaults.

Ground rules

  • The 24-hour clock is a window, not a workload. Stop at roughly the suggested effort, then write down what you would do next. A small, finished, tested core beats a large unfinished one.
  • Use the AI agent as much or as little as you like: every prompt is recorded and the report shows how it was used. You are judged on the result and on whether you understood and verified what the agent produced.
  • The work is yours. PraxisAI uses it only to produce your assessment report.