Crates.io | Mazeir |
lib.rs | Mazeir |
version | 0.2.0 |
source | src |
created_at | 2023-08-25 08:01:02.300216 |
updated_at | 2023-08-25 08:01:02.300216 |
description | A fast and small memory maze generator. |
homepage | |
repository | https://github.com/Griklit/Mazeir |
max_upload_size | |
id | 954484 |
size | 572,645 |
For Giant Maze
use mazeir::map::Orthogonal;
use mazeir::algorithm::DepthFirst;
use mazeir::output::Print;
fn main() {
let mut maze = Orthogonal::new(7, 16);
maze.depth_first();
maze.print();
}
Orthogonal
one byte one cellDepthFirst
Print
Draw
stream write to 1bit png file>>> mazeir-cli --help
Usage: mazeir-cli <COMMAND>
Commands:
orthogonal 2D orthogonal maze
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Orthogonal Maze
>>> mazeir-cli orthogonal --help
2D orthogonal maze
Usage: mazeir-cli orthogonal [OPTIONS] [WIDTH] [HEIGHT]
Arguments:
[WIDTH] Width of the maze [default: 16]
[HEIGHT] Height of the maze [default: 16]
Options:
-a, --algorithm <ALGORITHM> Algorithm of generate the maze. support DepthFirst only [default: DepthFirst]
-s, --seed <SEED> Seed for the maze
-d, --draw <OUTPUT_FILE_PATH> Draw the maze to a png file
-p, --print Print the maze to stdout
-h, --help Print help