From bb103dc18ed5456ae376e7eda353cf5c0fbdbb4a Mon Sep 17 00:00:00 2001 From: Edvin Jakobsson Date: Tue, 8 Sep 2026 19:12:44 +0200 Subject: Added README --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..f73132a --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Mine Sweeper + +A Minesweeper clone in C and SDL2, and the project where recursive flood-fill finally clicked for me. + +A 10x10 board gets seeded with 15 mines, each tile counts the mines in its own 3x3 neighborhood, and clicking an empty tile (zero neighboring mines) sets off a small recursive reveal that keeps opening neighbors until it runs into a ring of numbered tiles on every side. Watching that cascade unfold correctly for the first time, opening up a whole empty region from a single click, was the fun part of this one. + +There's also a chording shortcut that reveals every unflagged tile around the one you're hovering, for clearing a region in one go once you've flagged its mines. + +## Controls + +- Left click — reveal a tile +- Right click — flag/unflag a tile +- `Space` — chord (reveal all unflagged neighbors of the hovered tile) + +## Building + +Needs SDL2 and SDL2_ttf. + +```sh +make +./mine_sweeper +``` + +## License + +GPLv3 — see `LICENSE`. -- cgit v1.2.3