ellerjs
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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;
}

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i ellerjs

    Weekly Downloads

    0

    Version

    0.0.2

    License

    ISC

    Unpacked Size

    7.15 kB

    Total Files

    7

    Last publish

    Collaborators

    • ihorb