From dda774cfbb7b812d38255256194e10f98bca2387 Mon Sep 17 00:00:00 2001 From: girst Date: Tue, 4 Jul 2017 21:49:21 +0200 Subject: [PATCH] more readme, update `-h` still TODO: screenshot --- README.md | 75 +++++++++++++++++++++++++++++++++++++--------------- mines_2017.c | 6 +++-- 2 files changed, 58 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 1f6542f..62008e5 100644 --- a/README.md +++ b/README.md @@ -6,24 +6,57 @@ controlled by either `vi` style keybindings, or the mouse. Multiple character and color schemes are available, but more can be added easily. -## Keybindings - -| Key | Action | -|:---:| ------------------ | -| `h` | move 1 cell left | -| `j` | move 1 cell down | -| `k` | move 1 cell up | -| `l` | move 1 cell right | -| `w` | move 5 cells right | -| `b` | move 5 cells left | -| `u` | move 5 cells up | -| `d` | move 5 cells down | -| `^` | move to the left | -| `$` | move to the right | -| `g` | move to the top | -| `G` | move to the bottom | -| `i` | flag / unflag | -| spc | open / choord | -| `r` | restart game | -| C-L | redraw screen | -| `q` | quit | +## Keybindings and mouse + +| Key | Action | +| ----------- | ------------------------- | +| `h`/`b`/`^` | move 1/5/all to the left | +| `j`/`d`/`G` | move 1/5/all down | +| `k`/`u`/`g` | move 1/5/all up | +| `l`/`w`/`$` | move 1/5/all to the right | +| `i` | flag / unflag | +| space | open / chord | +| `r` | restart game | +| Ctrl-L | redraw screen | +| `q` | quit | + +Use the left mouse button to open or chord a cell, and the right button to flag. + +A new game can be started by clicking on the `:D` icon. + +## Command line arguments + +| Arg. | Description | +| ------ | ------------------------------- | +| `-h` | quick help | +| `-w N` | set field width to N cells | +| `-h N` | set field height to N cells | +| `-m N` | set number of mines to N | +| `-n` | disable flagging | +| `-f` | enable flagging (default) | +| `-q` | enable question marks | +| `-c` | switch to the colored scheme | +| `-d` | switch to the DEC charset scheme | + +## Character Schemes + +By default, minesVIiper comes with three schemes; black-and-white, color, and +DECTerm. The first two use unicode characters and therefore require a modern +software terminal emulator like GNOME Terminal, XTerm, or others. +The DEC color scheme uses Digital, Inc.'s proprietary *Special Graphics Character +Set*, which is implemented on the VT220 and later models. (full support for this mode +in terminal emulation software is rare) + +## Compiling and extending + +To compile minesVIiper, just run `make`. The phony target `run` will compile and +execute the program with the default settings (monochrome scheme, 30x16x99 +field). + +While the main source of the program (`mines_2017.c`) is pure ASCII, `schemes.h` +is UTF-8-encoded. Therefore, care must be taken when editing character schemes. + +## License + +This program is released under the terms of the GNU GPL version 3. +© 2015-2017 Tobias Girstmair diff --git a/mines_2017.c b/mines_2017.c index 155f82e..3d294a2 100644 --- a/mines_2017.c +++ b/mines_2017.c @@ -1,5 +1,5 @@ /******************************************************************************* - minesviiper 0.3.11 + minesviiper 0.3.14 By Tobias Girstmair, 2015 - 2017 ./minesviiper -w 16 -h 16 -m 40 @@ -201,9 +201,11 @@ int main (int argc, char** argv) { "\n" "hjkl: move 1 left/down/up/right\n" "bduw: move 5 left/down/up/right\n" + "^Gg$: move to the left/bottom/top/right\n" "left mouse/space: open/choord\n" "right mouse/i: flag/unflag\n" - ":D / r: start a new game\n", argv[0]); + ":D / r: start a new game\n" + "q: quit\n", argv[0]); return 1; } } -- 2.39.3