doolhof

1.0.4 • Public • Published

doolhof

Build Status npm version Greenkeeper badge

Doolhof, which stands for a labyrinth in Dutch, helps you genrates a maze, using Prim's algorithm.

Install

npm install doolhof

or

yarn add doolhof

Usage

import Doolhof from 'doolhof'
 
const maze = new Doolhof({
  row: 5, // The row count of the maze. Walls are excluded. Default: 10.
  col: 5, // The column count of the maze. Walls are excluded. Default: 10.
  start: [1, 0], // The coordinate of the entry. Walls are included. Default: the top-left corner.
  end: [9, 10] // The coordinate of the exit. Walls are included. Default: the bottom-right corner.
})
 
maze.generate() // Generates a new maze with the given option.
maze.get() // Get the formatted data of the maze.

Readme

Keywords

Package Sidebar

Install

npm i doolhof

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

80.2 kB

Total Files

9

Last publish

Collaborators

  • zoron