1.0.5 • Published 7 years ago
maze-es6-solver v1.0.5
Maze solver 1.0.4
Simple maze solver using ES6 + recursive method.
How to use
First, npm install, then:
  import { MazeGenerator, MazeSolver } from 'maze-es6-solver';
  const mazeGenerator = new MazeGenerator(4,2);
  const maze          = mazeGenerator.run();
  const solver        = new MazeSolver(maze);
  solver.draw();
  console.log(' \n');
  console.time('TIME');
  solver.traverse(0,1);
  console.timeEnd('TIME');
  solver.draw();Custom mazes
See the example at input/example-1.js:
- 'E' is the entry point.
- ' ' is path.
- '=' is wall.
- 'G' is the exit.
Info
- There are few algorithms to solve mazes, this is from this article:
I want to use recursive methods in ES6, this repository is not to another purpose!