Fixed a syntax error.

This commit is contained in:
2020-05-19 15:22:53 -05:00
parent 163c028145
commit 7405f88bd6
+11 -1
View File
@@ -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.
}
}*/