puzzle-lib

Crates.iopuzzle-lib
lib.rspuzzle-lib
version0.2.0
sourcesrc
created_at2024-07-21 12:18:14.120955
updated_at2024-08-10 04:36:00.01057
description数字华容道 核心库
homepagehttps://github.com/initialencounter/puzzle
repositoryhttps://github.com/initialencounter/puzzle
max_upload_size
id1310263
size6,761
WWWw (initialencounter)

documentation

README

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]);
    }
}
Commit count: 0

cargo fmt