An open API service indexing awesome lists of open source software.

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

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.