Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "labyrinth", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A JavaScript Maze Generator", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
}, | ||
"file": "src/labyrinth.js", | ||
"main": "src/labyrinth.js", | ||
"repository": { | ||
@@ -15,3 +15,7 @@ "type": "git", | ||
}, | ||
"author": "Brandon Heyer", | ||
"author": { | ||
"name": "Brandon Heyer", | ||
"email": "brandonheyer@gmail.com", | ||
"url": "http://www.brandonheyer.com" | ||
}, | ||
"license": "MIT", | ||
@@ -18,0 +22,0 @@ "bugs": { |
@@ -17,2 +17,8 @@ ``` | ||
# About | ||
This maze generator and the accompanying algorithm was inspired by a slide show by Jamis Buck called | ||
["Algorithm is Not a Four Letter Word"](a href="http://www.jamisbuck.org/presentations/rubyconf2011/index.html). | ||
It is a great read that goes over what mazes are, various ways of generating mazes and the importance of working with algorithms. You can learn more about what I learned while making this generator and algorithm over at this blog post: | ||
["Maze Generating Algorithms: Fun with HTML and JavaScript"](http://www.brandonheyer.com/2013/04/24/maze-generating-algorithms-fun-with-html-and-javascript). | ||
# Usage | ||
@@ -32,2 +38,13 @@ | ||
#### Options | ||
These are the current options that can be passed to either the `generate()` method | ||
or upon construction of the generator: | ||
* `split` - a number from 0 - 100, defaulting to 50. This represents the style of the maze. | ||
0 means a lot of long wondering corridors, and 100 means a lot of short dead ends. | ||
* `height` - Defaults to 20. The number of cells tall the maze is. | ||
* `width` - Defaults to 50. The number of cells wide the maze is. | ||
* `startX` - Defaults to a random value. The starting cell's x position. | ||
* `startY` - Defaults to a random value. The starting cell's y position. | ||
## Traverser | ||
@@ -34,0 +51,0 @@ Import the traverser and instantiate it with an instance of a generator. Call |
1050961
81