Skip to content

MArtur2265/angular-maze-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maze solver & generator

Maze solver & generator made in Angular v11 framework.

License

Current features

  • Loading & uploading maze from file,
  • Generating maze using Prim's algorithm,
  • Solving maze with DFS & BFS algorithms,
  • Drawing maze representation on canvas,
  • Settings for canvas drawing,
  • Left click on canvas to open it in new window.

Installation

  1. Clone this repo to your local computer.
  2. Make sure that you have Node 12.14 or 14.0 installed. See instructions here.
  3. Open your CMD and move to "maze-solver" subfolder inside cloned repo.
  4. Type npm install.
  5. After it's done type ng serve.
  6. By default app will be served on http://localhost:4200/

Examples

An example of a JSON maze file

{
  "width": 8,
  "height": 8,
  "board": [
    [2, 0, 0, 0, 1, 1, 0, 0],
    [1, 0, 1, 0, 0, 0, 0, 1],
    [1, 1, 1, 0, 1, 1, 0, 1],
    [0, 0, 0, 0, 1, 1, 0, 1],
    [0, 1, 1, 1, 0, 0, 0, 1],
    [0, 1, 0, 0, 0, 1, 0, 0],
    [0, 0, 0, 1, 0, 1, 1, 1],
    [0, 1, 0, 0, 0, 0, 0, 3]
  ]
}
Board value Meaning
0 passage cell
1 wall cell
2 entrance cell
3 exit cell

UI

Example29x29Maze

An example of a generated maze with 989 width and 987 height

Example989x987Maze

About

Maze solver & generator made in Angular v11 framework.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published