2.1.1 • Published 7 years ago

textmaze v2.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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:

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

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.0

7 years ago