Crate sweeprs[][src]

Expand description

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!").
    _ => (),
}

Structs

Default implementation of the SweeperBoard trait

Default cell struct

Enums

Indicate what the mine contain

Hold the state of the cell

General error type

Traits