2 unstable releases

0.2.0 Aug 10, 2024
0.1.0 Jul 21, 2024

#30 in #puzzle

Download history 110/week @ 2024-08-07 12/week @ 2024-08-14 25/week @ 2024-09-11 21/week @ 2024-09-18 28/week @ 2024-09-25 3/week @ 2024-10-02

126 downloads per month
Used in puzzle-game

AGPL-3.0

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
~23K SLoC