No description
Find a file
2019-11-26 00:04:05 +09:00
.github/workflows Workflowにキャッシュを導入 2019-11-26 00:00:47 +09:00
src バージョンアップ #2 2019-11-02 05:51:11 +09:00
tests テストコード修正 2019-11-01 00:31:39 +09:00
.gitignore リリースフローを追加 #2 2019-11-02 05:50:30 +09:00
LICENSE Add license 2019-11-01 20:19:18 +09:00
maze.nimble APIドキュメント生成方法を変更 2019-11-25 23:53:06 +09:00
README.adoc Nimbleバッジ追加 2019-11-26 00:04:05 +09:00

= 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