Simple minesweeper in Rust based on piston_window
To win the game - open all cells with numbers.
Controls:
* R
- restart
* H
- field height setup
* W
- field width setup
* M
- mines quantity setup
* Arrows
to choose cell (or change settings in setup
mode)
* Space
to open cell
* Ctrl
to mark cell
* Esc
to exit
* LMB
click on a cell to open
* RMB
click on a cell to mark
NOTE: marked cells disallow opennig them, until mark will be removed.
In game screenshot (green cells are marked)
Defeat (red cells are missed mines)
minesweeper
is licensed under the MIT license. Please read the LICENSE file in this repository for more information.
Follow these instructions to compile cargo-count
, then skip down to Installation.
$ git clone https://github.com/Vinatorul/minesweeper-rs && cd minesweeper-rs
$ cargo build --release
(NOTE: There is a large performance differnce when compiling without optimizations, so I recommend alwasy using --release
to enable to them)target/release/minesweeper
Pass -h
to arguments or look here:
``` USAGE: minesweeper [FLAGS] [OPTIONS]
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
-f, --field
Contributions are always welcome! Please use the following guidelines when contributing to minesweeper
minesweeper
git clone https://github.com/$YOUR_USERNAME/minesweeper-rs && cd minesweeper-rs
)git checkout -b new-branch
)git commit -am "your message"
)
TYPE(COMPONENT): MESSAGE
where TYPE
is one of the following:feat
- A new featureimp
- An improvement to an existing featureperf
- A performance improvementtests
- Changes to the testing framework or tests onlyfix
- A bug fixrefactor
- Code functionality doesn't change, but underlying structure maystyle
- Stylistic changes only, no functionality changeswip
- A work in progress commit (Should typically be git rebase
'ed away)chore
- Catch all or things that have to do with the build system, etcgr
- Graphics changesCOMPONENT
is optional, and may be a single file, directory, or logical component. Can be omitted if commit applies globallycargo test
)git rebase
into concise commits and remove --fixup
s (git rebase -i HEAD~NUM
where NUM
is number of commits back)git push origin $your-branch
)