2 unstable releases

0.2.0 Aug 10, 2024
0.1.0 Jul 21, 2024

#28 in #puzzle

Download history 6/week @ 2024-07-28 76/week @ 2024-08-04 44/week @ 2024-08-11 2/week @ 2024-08-18 32/week @ 2024-09-15 24/week @ 2024-09-22 21/week @ 2024-09-29

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