textmaze

2.1.1 • Public • Published

NPM

Installation

Install the package and save in your package.json

npm install --save textmaze

User Guide

var textmaze = require('textmaze');

text = new textmaze.TextMaze()
view = text.render(room);

The room object needs to support the following methods that return a room object:

class Room {
     goForward(direction) {};
     goLeft(direction) {};
     goRight(direction) {};
}

The rendered maze will look something like:

                               /
                              / 
--+                          +  
  |\                        /|  
  | \                      / |  
  |  +                    +  |  
  |  |                    |  |  
  |  |                    |  |  
  |  |                    |  |  
  |  |                    |  |  
  |  |                    |  |  
  |  |                    |  |  
  |  |                    |  |  
  |  +                    +  |  
  | /                      \ |  
  |/                        \|  
--+                          +  
                              \ 
                               \

Readme

Keywords

Package Sidebar

Install

npm i textmaze

Weekly Downloads

4

Version

2.1.1

License

MIT

Last publish

Collaborators

  • terrylhowe