mirror of
https://github.com/jiro4989/maze
synced 2026-01-13 09:21:44 +00:00
No description
| .github/workflows | ||
| src | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| maze.nimble | ||
| README.adoc | ||
= maze
:toc: left
:sectnums:
image:https://github.com/jiro4989/maze/workflows/build/badge.svg[]
image:https://github.com/jiro4989/maze/workflows/docs/badge.svg[]
image:https://nimble.directory/ci/badges/maze/nimdevel/status.svg[]
image:https://nimble.directory/ci/badges/maze/nimdevel/docstatus.svg[]
`maze` is a module and command to generate maze.
You can select algorithm to generate maze.
[source,text]
----
#######################################
# # # # #
### # # # # ### ############# # #######
# # # # # # # # # # # # # #
### # # # # # # ##### # ### # # # # ###
# # # # # # # # # # # # # #
##### # # # # # # ### # ### # ### # ###
# # # # # # # # # # # # # # # # #
# # # # # # ### ### # # ### # ### # ###
# # # # # # # # # # #
####### # ########### # ### ##### # ###
# #
##### ### ### ##### ### ###############
# # # # # # # # # # # # # # #
# # # # # ### # # # # # # # ### ### ###
# # # # # # # # # # # # # # # # #
### # # # ### # # # # # # # # # # #####
# # # # # # # # # # # # # #
### # # # ### ### # # # # # # # #######
# # # # # # # # # # # # # #
### # # # ### ### # # # # # # # # # ###
# # # # # # # # # # # # # #
##### # # ### ### # # # ### # # # # ###
# # # # # # # # # # # # # #
### # # # ### # # # # # ### # # #######
# # # # # # # # # # # # # #
##### # # ### # # # # # # ### # #######
# # # # # # # # # # # # #
# ### # # ##### # # # # # ### # ### ###
# # # # # # # # # # # # #
# # # # # ######### # # # ##### # #####
# # # # # # # # #
# # # # # ##################### #######
# # # # # # #
# # # ### ##################### ### ###
# # # # #
# # # # # # # # # # # # # # # # # # ###
# # # # # # # # # # # # # # # # # # ###
#######################################
----
== Development
Nim version 1.0.2
== Usage examples
=== Installation
[source,bash]
----
nimble install maze
----
=== command
Generate maze.
[source,bash]
----
maze
----
Change width and height.
[source,bash]
----
maze -W:65 -H:43
----
Change road character and wall character.
[source,bash]
----
maze -r:- -w:0
----
Change algorithm.
[source,bash]
----
maze -a:poledown
----
Print generating process.
[source,bash]
----
maze -p
----
=== API
Pole down maze.
[source,nim]
----
import maze
## width and height must be odd.
var m = newMazeByPoleDown(19, 19)
echo m.format(" ", "#")
----
Digging maze.
[source,nim]
----
import maze
var m = newMazeByDigging(20, 20)
echo m.format(" ", "#")
----
== Document
* https://jiro4989.github.io/maze/maze.html
== License
MIT