Install the package and save in your package.json
npm install --save textmaze
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:
/
/
--+ +
|\ /|
| \ / |
| + + |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| + + |
| / \ |
|/ \|
--+ +
\
\