From 7405f88bd69077bdecadb5913fff29bfcea8e6b5 Mon Sep 17 00:00:00 2001 From: Garritt McCune Date: Tue, 19 May 2020 15:22:53 -0500 Subject: [PATCH] Fixed a syntax error. --- maze-solver.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/maze-solver.js b/maze-solver.js index 0e84606..a93d107 100644 --- a/maze-solver.js +++ b/maze-solver.js @@ -58,9 +58,11 @@ class DepthFirstSolver extends MazeSolver { this.explored.push(this.currentCell); this.statesExplored++; - if(this.currentCell.x == this.targetCell.x && this.currentCell.y == this.targetCell.y) + if(this.currentCell.x == this.targetCell.x && this.currentCell.y == this.targetCell.y) { this.frontier = []; this.currentCell.color = this.searchedColor; + + } } } @@ -87,3 +89,11 @@ class BreadthFirstSolver extends MazeSolver { this.currentCell.color = this.searchedColor; } } +/* +class AStarSolver extends MazeSolver { + constructor(startingCell, targetCell, searchedColor = [210, 180, 140], finalPathColor = [173, 216, 230]) { + super(staringCell, targetCell, searchedColor, finalPathColor); + + this. + } +}*/