mnswpr-0.2.0 is not a library.
Minesweeper
Terminal minesweeper
Controls
You can move the cursor ([...]) by using arrows, wasd or hjkl.
Uncover the cell under the cursor by pressing <space> or <insert>, or flag (or un-flag it) by pressing f.
Press q at any moment to quit.
Note: controls are case-insensitive
CLI options
The field can be customized via CLI flags:
-cor--columnscontrols the numer of columns of the field-ror--rowscontrols the number of rows of the field-mor--mine-percentagecontrols the % of mines in the field
If you don't want to specify the dimensions, you can use the -p or --preset flags and provide one of the provided presets:
tiny: 20x13 fieldsmall: 30x20 fieldmedium: 40x25 fieldlarge: 50x30 fieldhuge: 60x40 field
Note that the sizes the field will always be constrained by the size of the terminal. As such, width and height will be clamped between 1 and you terminal's width/height minus some padding
Screenshots
