0.0.2 • Published 9 months ago

ellerjs v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

ellerjs

tests npm

A JavaScript implementation of Eller's maze generation algoritm. this algorithm creates mazes that have a path between any two cells.

Rendered example

maze.png

Installation

npm i ellerjs

Usage

const eller = require('ellerjs');
const maze = eller(15, 15);

Maze is two-dimensional array representing rows and cells. Cell structure:

interface Cell {
  top: boolean; // true if cell has a wall in this direction, false if not
  bottom: boolean;
  left: boolean;
  right: boolean;
}