Mazeir

Crates.ioMazeir
lib.rsMazeir
version0.2.0
sourcesrc
created_at2023-08-25 08:01:02.300216
updated_at2023-08-25 08:01:02.300216
descriptionA fast and small memory maze generator.
homepage
repositoryhttps://github.com/Griklit/Mazeir
max_upload_size
id954484
size572,645
Griklit (Griklit)

documentation

README

Mazeir

For Giant Maze

Library

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();
}

Maze Map Type

  • Orthogonal one byte one cell

Algorithm Traits

  • DepthFirst

Output Traits

  • Print
  • Draw stream write to 1bit png file

Command Line Interface

Base

>>> 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

Features

Map

  • 2D orthogonal maze
  • 2D hexagonal maze
  • 3D orthogonal maze

Algorithm

  • Depth First
  • Some kind of borderless algorithm
  • Etc..

Output

  • Print to stdout
  • Draw to png file
  • Output to txt file
  • Custom color index 1bit PNG file
Commit count: 31

cargo fmt