https://github.com/ettomatic/amazer
A simple random maze generator
https://github.com/ettomatic/amazer
Last synced: about 1 year ago
JSON representation
A simple random maze generator
- Host: GitHub
- URL: https://github.com/ettomatic/amazer
- Owner: ettomatic
- Created: 2016-02-08T09:57:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-09T01:59:47.000Z (over 10 years ago)
- Last Synced: 2025-06-24T19:14:39.730Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Amazer
A simple random maze generator
# Setup
```
bundle install
bundle exec rackup
```
Now you can visit the web interface at
[http://127.0.0.1:9292](http://127.0.0.1:9292).
Use this command to run the test suite:
```
bundle exec rspec
```
# Usage
`/maze/random` generates a radom maze
```
$ curl http://localhost:9292/maze/random
+---+---+---+---+---+---+---+---+---+---+
| S | | |
+ + +---+ +---+ + + + +---+
| | | | | | | |
+---+---+ + +---+ +---+---+ + +
| | | |
+ + + + +---+---+---+---+---+---+
| | | | | |
+---+ +---+---+ +---+ +---+---+---+
| | | |
+ +---+---+---+ +---+---+---+---+ +
| | | |
+ +---+ +---+---+---+ +---+---+---+
| | | | |
+---+ +---+ +---+---+ +---+---+ +
| | | | | | | |
+ + + +---+ + +---+ +---+---+
| | | | | | |
+---+ + + + + + +---+---+ +
| | E |
+---+---+---+---+---+---+---+---+---+---+
```
**Request params:**
- `size` Defaults to 10, will set the resolution of the maze eg `/maze/random?size=6` will produce a 36 rooms maze.
- `solution` Defaults to false, `/maze/random?solution=true` will show the path to solve the maze.