1.0.4 • Published 4 years ago

doolhof v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

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.
1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago