2 unstable releases
0.2.0 | Aug 10, 2024 |
---|---|
0.1.0 | Jul 21, 2024 |
#29 in #puzzle
126 downloads per month
Used in puzzle-game
7KB
151 lines
puzzle-lib
A library for puzzle games.
usage
// import the library
use puzzle_lib::Puzzle;
fn main() {
let puzzle = Puzzle::new(3, 3);
// show the puzzle
for i in 0..3{
println!("{:?}", puzzle.puzzle[i]);
}
println!();
// move the tile to the up
puzzle.move_tile('U');
// show the puzzle
for i in 0..3{
println!("{:?}", puzzle.puzzle[i]);
}
}
Dependencies
~0.6–1.1MB
~24K SLoC