12 stable releases

1.1.19 Sep 29, 2024
1.1.18 Sep 12, 2024
1.1.17 Jan 25, 2024
1.1.16 Aug 7, 2023
1.1.6 Oct 31, 2022

#6 in Games

Download history 140/week @ 2024-09-10 13/week @ 2024-09-17 173/week @ 2024-09-24 55/week @ 2024-10-01 7/week @ 2024-10-08

885 downloads per month

MIT license

27KB
601 lines

rustymines

A mine sweeping game for the console with optional dud mines.

Parameters

You can specify the field size, amount of mines and amount of duds:

  • --width The width of the field
  • --height The height of the field
  • --mines Amount of mines on the field
  • --duds Amount of duds among the mines

Playing

You play the game by either flagging or visiting fields. The game is over, if you stepped onto a mine, which is not a dud, in which case you lose, or you uncover all fields that do not contain a mine, in which case you win.

Visiting fields

You can visit fields, which you deem safe, by specifying the x and y coordinate. E.g.: 2 3 to visit the field at coordinate x=2 and y=3.

Flagging fields

You can flag fields under which you suspect a mine by prepending an exclamation mark to the coordinate. E.g.: !3 1 to flag the field at coordinate x=3 and y=1.

You can remove a flag from a field by repeating the command, i.e. this command toggles a field's flag.

Uncovering all remaining fields

You can uncover all non-flagged fields by providing two exclamation marks: !!

Aborting the game

You can abort and quit the game at any time by typing: exit

Dependencies

~1.9–2.6MB
~48K SLoC