1.0.5 • Published 5 years ago

maze-es6-solver v1.0.5

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
5 years ago

Maze solver 1.0.4

https://travis-ci.org/jesusgn90/maze-es6-solver.svg?branch=master https://img.shields.io/npm/v/maze-es6-solver.svg https://img.shields.io/npm/dm/maze-es6-solver.svg

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

I want to use recursive methods in ES6, this repository is not to another purpose!

1.0.5

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago