https://github.com/ma3ke/mine
My minesweeper game.
https://github.com/ma3ke/mine
cli minesweeper rust stuctopt terminal tui winit
Last synced: 2 months ago
JSON representation
My minesweeper game.
- Host: GitHub
- URL: https://github.com/ma3ke/mine
- Owner: ma3ke
- License: mit
- Created: 2021-12-23T15:03:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-03T18:15:57.000Z (almost 3 years ago)
- Last Synced: 2025-02-28T13:08:14.984Z (3 months ago)
- Topics: cli, minesweeper, rust, stuctopt, terminal, tui, winit
- Language: Rust
- Homepage:
- Size: 88.9 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mine
A minesweeper game with a terminal and graphical interface created by [Koen Westendorp](https://github.com/KoenWestendorp).


## Installation
Go ahead and try out for yourself! :)
```zsh
git clone https://github.com/KoenWestendorp/mine.git
cd mine
cargo install --path .
```### Features
By default, the `tui` feature is enabled. The `gui` feature can be enabled by using
```zsh
cargo install --features=gui --path .
```## Usage
```zsh
mine
```### Subcommands
`tui`
: Terminal interface for Mine.`gui`
: Graphical interface for Mine.`help`
: Prints help message or the help of the given subcommand.### Flags
`--help`
: Prints help information.`-V, --version`
: Prints version information.`-w, --width `
: Field width (default: 9)`-h, --height `
: Field height (default: 9)`-m, --mines `
: The number of mines to be placed in the field (default: 10)## Controls
### Movement
←, ↓, ↑, →
: 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.### Actions
`f`, ``
: Flag selected cell.`r`, ``, ``
: 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.## Warning
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 :)
## About
This program is written in [Rust](https://rust-lang.org).
[structopt](https://crates.io/crates/structopt) is used for command line argument parsing,
[console](https://crates.io/crates/console) for terminal utilities, and
[winit](https://crates.io/crates/winit) for the gui.Contributions very, very welcome :)