maze

A command and library to generate mazes


Keywords
maze, cli, library, algorithm, nim
License
MIT
Install
nimble install maze

Documentation

maze

maze is a module and command to generate maze. You can select algorithm to generate maze.

 #######################################
 #   # # #                             #
 ### # # # # ### ############# # #######
 #   # # # # #   #     # #   # # # #   #
 ### # # # # # # ##### # ### # # # # ###
 #     # # # # # #     # #   # # # #   #
 ##### # # # # # # ### # ### # ### # ###
 # # # # # # # # # # # #   # # #   #   #
 # # # # # # ### ### # # ### # ### # ###
 #       # # #       # # #   #   # #   #
 ####### # ########### # ### ##### # ###
 #                                     #
 ##### ### ### ##### ### ###############
 # # # # #   # # # # # # # # #         #
 # # # # # ### # # # # # # # ### ### ###
 #   # # # #   # # # # # # # # # # #   #
 ### # # # ### # # # # # # # # # # #####
 #   # # #   #   # # # # # # # #       #
 ### # # # ### ### # # # # # # # #######
 #   # # # #     # # # # # # # #       #
 ### # # # ### ### # # # # # # # # # ###
 #     # #   # #   # # # #   # # # #   #
 ##### # # ### ### # # # ### # # # # ###
 #   # # #   # # # # # # #       # #   #
 ### # # # ### # # # # # ### # # #######
 #     # # #   # # # # # # # # #       #
 ##### # # ### # # # # # # ### # #######
 #     # # #   # # # # # #   # #       #
 # ### # # ##### # # # # # ### # ### ###
 #   # # #         # # # # #   # # #   #
 # # # # # ######### # # # ##### # #####
 # # # # #         #   # #             #
 # # # # # ##################### #######
 # # #   # #                     #     #
 # # # ### ##################### ### ###
 # # #   #                             #
 # # # # # # # # # # # # # # # # # # ###
 # # # # # # # # # # # # # # # # # # ###
 #######################################

1. Development

Nim version 1.0.2

2. Usage examples

2.1. Installation

nimble install maze

2.2. command

Generate maze.

maze

Change width and height.

maze -W:65 -H:43

Change road character and wall character.

maze -r:- -w:0

Change algorithm.

maze -a:poledown

Print generating process.

maze -p

2.3. API

Pole down maze.

import maze
## width and height must be odd.
var m = newMazeByPoleDown(19, 19)
echo m.format(" ", "#")

Digging maze.

import maze
var m = newMazeByDigging(20, 20)
echo m.format(" ", "#")

4. License

MIT