Skip to content
A maze generator written in rust
Rust
Branch: master
Clone or download
Latest commit c45d218 Aug 16, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Make algo and size non-default and non-positional Aug 14, 2019
.gitignore Add first maze generation attempt Aug 7, 2019
Cargo.lock Move to argument parsing library Aug 11, 2019
Cargo.toml licence -> license Aug 16, 2019
LICENSE Create LICENSE Aug 10, 2019
README.md Update README with new args Aug 14, 2019

README.md

MazeGen

This project is built in rust and aims to generate mazes using a variety of methods. The currently implemented methods include:

  • Depth First Search
  • Kruskal's Algorithm
  • Wilson's Algorithm
  • Eller's Algorithm
  • Prim's Algorithm

Building

To build run the following from the root directory:

cargo build

Testing

Tests can be run with the following command:

cargo test

Running

To generate a maze run:

cargo run

To specify a 15x15 maze generated with the DFS algorithm run:

cargo run -- -s 15 -a dfs

Output:

┏━━━━━━━━━━━━━━━┳━━━┳━━━━━┳━━━┓
┃ ╺━━━━━━━━━━━┓ ┃ ╻ ┣━╸ ╻ ┃ ╺━┫
┃ ╺━┳━━━━━┳━╸ ┃ ┃ ┃ ╹ ┏━┫ ┣━╸ ┃
┃ ┏━┛ ┏━╸ ┃ ┏━┫ ┃ ┣━━━┛ ┃ ┃ ╺━┫
┣━┛ ┏━┛ ╺━┛ ┃ ╹ ┃ ┃ ╺━━━┛ ┣━╸ ┃
┃ ╺━┻━━━━━┳━┛ ┏━┛ ┃ ╺━┳━━━┫ ╻ ┃
┣━━━━━━━┓ ┃ ╺━┛ ┏━┻━┓ ┃ ╻ ╹ ┃ ┃
┃ ╻ ╺━━━┫ ┗━━━━━┫ ╻ ╹ ┃ ┗━━━┫ ┃
┃ ┣━━━┓ ┗━━━━━━━┫ ┗━┳━┛ ╺━┓ ┗━┫
┃ ┃ ╻ ┣━╸ ┏━━━┓ ┗━┓ ┃ ┏━━━┻━╸ ┃
┃ ┃ ┃ ╹ ┏━┛ ╺━┛ ┏━┛ ┃ ┃ ┏━━━╸ ┃
┃ ┃ ┣━━━┻━┓ ╺━┳━┛ ┏━┻━┛ ┃ ┏━━━┫
┃ ┃ ┃ ┏━┓ ┗━━━┛ ┏━┛ ┏━━━┫ ┃ ╺━┫
┣━┛ ┃ ╹ ┣━━━┳━━━┫ ╻ ╹ ╻ ┃ ┣━╸ ┃
┃ ╺━┻━╸ ╹ ╻ ╹ ╻ ┗━┻━━━┛ ┃ ╹ ╻ ┃
┗━━━━━━━━━┻━━━┻━━━━━━━━━┻━━━┻━┛
You can’t perform that action at this time.