-
Notifications
You must be signed in to change notification settings - Fork 8
Home
To use the CLI you first need to download the app and to have on your computer the .Net Core 5 runtime.
The CLI is designed to be composable with a maximum of options on each step to create unique and beautiful mazes.
The basic idea is to pipe different actions to generate and visualize, in the end, a maze.
The actions are :
- Choosing a canvas
- Choosing a type of grid
- Choosing a maze generator algorithm
- Choosing a render
- Choosing an output
For example, the following line will generate a text maze in a file :
.\Mazes.exe s-rectangle -r 6 -c 10 : g-ortho : a-hk -s 1 : rt-ortho -e : o-file -p "./test.txt"
Each part is separated by a ':' wich is used as the pipe symbol.
Let's break it down :
| Actions | Description |
|---|---|
| .\Mazes.exe | the path to the CLI itself |
| s-rectangle -r 6 -c 10 | a rectangle shape with 6 rows and 10 columns |
| g-ortho | an orthogonal grid type |
| a-hk -s 1 | use the "Hunt and Kill" algorithm with a random seed of 1 to generare the maze |
| rt-ortho -e | the text unicode render with an entrace and an exit |
| o-file -p "./test.txt" | save on the disk into the specified file |
The result might look like this :
━┯━━━━━┯━━━━━┯━━━━━┓
┳ ┴ ╭─╴ │ ┬ ╶─╯ ┬ ┬ ┃
┠───╯ ╶─┴─┴─┬─╴ │ │ ┃
┃ ╶─╮ ╭───╴ ┴ ╭─┴─╯ ┃
┠───┤ │ ╭───┬─┴─┬─╴ ┃
┃ ┬ ┴ │ ┴ ┬ ╰─╴ │ ╶─┚
┗━┷━━━┷━━━┷━━━━━┷━━━
There are a number of actions available for each step. Note that not every combination will yield a valid maze.
It is possible to get every option for a given action by using --help so for example s-rectangle --help
A website in preview version is available here where you can generate random mazes.