A minesweeper game with a terminal and graphical interface created by Koen Westendorp.
Go ahead and try out for yourself! :)
git clone https://github.com/KoenWestendorp/mine.git
cd mine
cargo install --path .
By default, the tui
feature is enabled. The gui
feature can be enabled by using
cargo install --features=gui --path .
mine <SUBCOMMAND>
tui
: Terminal interface for Mine.
gui
: Graphical interface for Mine.
help
: Prints help message or the help of the given subcommand.
--help
: Prints help information.
-V, --version
: Prints version information.
-w, --width <width>
: Field width (default: 9)
-h, --height <height>
: Field height (default: 9)
-m, --mines <mines>
: The number of mines to be placed in the field (default: 10)
←, ↓, ↑, → : Arrows for cursor movement.
h
, j
, k
, l
: Vim movement bindings!
H
, J
, K
, L
, g
, G
, 0
, $
: Move to edges.
: Note: $
to move to the right edge of the field has not been implemented in the gui, yet.
f
, <Space>
: Flag selected cell.
r
, <Enter>
, <Tab>
: Reveal selected cell.
: Double-pressing will reveal around the cell if the correct number of flags is set around the cell.
q
, ^C
: Quit the program.
Please note that the gui mode is still extremely unstable, and hardly usable if you do not really know it. I am learning about this through making it. Sometimes, my display manager crashes, for example, because of resizing issues. Any ideas on improving this are very welcome :)
This program is written in Rust. structopt is used for command line argument parsing, console for terminal utilities, and winit for the gui.
Contributions very, very welcome :)