← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: e9c04c8f1553fe9bb83a1444d1bdd48c1e5e9187 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# nsweeper

A first pass at Minesweeper in ncurses — a grid of tiles, a quarter of them mined, move a cursor with WASD and press enter to dig. It's the roughest of the terminal projects here and it shows: the neighbor-counting function (`cac`) recurses in a way that doesn't quite work out, and there are leftover debug prints and a stray `getch()` still sitting in that loop from tracking it down mid-session. It was never revisited after the first commit.

Comes with a prebuilt `nsweeper` binary checked into the repo alongside the source, from whenever it was last built.

## Controls

- `W`/`A`/`S`/`D` — move the cursor
- `Enter` — dig the current tile

## Building

Needs ncurses.

```sh
cc nsweeper.c -lncurses -o nsweeper
./nsweeper
```