2 unstable releases
0.2.0 | Aug 29, 2021 |
---|---|
0.1.0 | Jul 22, 2021 |
#17 in #minesweeper
16KB
341 lines
Sweeprs
Sweeprs is a minesweeper engine built in rust.
License
This project is licensed under the MIT License.
lib.rs
:
sweeprs is a minesweeper engine written in rust.
Example:
use sweeprs::{Board, BoardState, BoardResult};
let mut board = Board::new(9, 9, 10);
board.open(4, 4);
board.flag(0, 0);
match board.state() {
BoardState::Playing => println!("Keep going!"),
BoardState::Finished(BoardResult::Win) => println!("You win!").
_ => (),
}
Dependencies
~305KB