Skip to content

CianLR/mazegen-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

┏━━━━━━━━━━━━━━━┳━━━┳━━━━━┳━━━┓
┃ ╺━━━━━━━━━━━┓ ┃ ╻ ┣━╸ ╻ ┃ ╺━┫
┃ ╺━┳━━━━━┳━╸ ┃ ┃ ┃ ╹ ┏━┫ ┣━╸ ┃
┃ ┏━┛ ┏━╸ ┃ ┏━┫ ┃ ┣━━━┛ ┃ ┃ ╺━┫
┣━┛ ┏━┛ ╺━┛ ┃ ╹ ┃ ┃ ╺━━━┛ ┣━╸ ┃
┃ ╺━┻━━━━━┳━┛ ┏━┛ ┃ ╺━┳━━━┫ ╻ ┃
┣━━━━━━━┓ ┃ ╺━┛ ┏━┻━┓ ┃ ╻ ╹ ┃ ┃
┃ ╻ ╺━━━┫ ┗━━━━━┫ ╻ ╹ ┃ ┗━━━┫ ┃
┃ ┣━━━┓ ┗━━━━━━━┫ ┗━┳━┛ ╺━┓ ┗━┫
┃ ┃ ╻ ┣━╸ ┏━━━┓ ┗━┓ ┃ ┏━━━┻━╸ ┃
┃ ┃ ┃ ╹ ┏━┛ ╺━┛ ┏━┛ ┃ ┃ ┏━━━╸ ┃
┃ ┃ ┣━━━┻━┓ ╺━┳━┛ ┏━┻━┛ ┃ ┏━━━┫
┃ ┃ ┃ ┏━┓ ┗━━━┛ ┏━┛ ┏━━━┫ ┃ ╺━┫
┣━┛ ┃ ╹ ┣━━━┳━━━┫ ╻ ╹ ╻ ┃ ┣━╸ ┃
┃ ╺━┻━╸ ╹ ╻ ╹ ╻ ┗━┻━━━┛ ┃ ╹ ╻ ┃
┗━━━━━━━━━┻━━━┻━━━━━━━━━┻━━━┻━┛

About

A maze generator written in rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages