2 unstable releases

0.2.0 Aug 10, 2024
0.1.0 Jul 21, 2024

#29 in #puzzle

Download history 244/week @ 2024-07-16 35/week @ 2024-07-23 4/week @ 2024-07-30 108/week @ 2024-08-06 14/week @ 2024-08-13 22/week @ 2024-09-10 14/week @ 2024-09-17 36/week @ 2024-09-24 5/week @ 2024-10-01

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