Added a maze solver object to handle the search algorithms that will be used to solve the maze. Updated the sketch code to use said object.

This commit is contained in:
2020-05-19 12:03:13 -05:00
parent eece3deffb
commit ff496ff63b
5 changed files with 159 additions and 183 deletions
+2
View File
@@ -22,6 +22,7 @@
clear: both;
}
</style>
<script src="maze-solver.js"></script>
<script src="cell.js"></script>
<script src="gen-maze.js"></script>
<script src="../p5.js"></script>
@@ -40,6 +41,7 @@
<select id="searchAlgo">
<option value="depthFirst">Depth First</option>
<option value="breadthFirst">Breadth First</option>
<option value="a">a*</option>
</select><br />
<label for="solvingFrameRate">Framerate During Maze Solving: </label><input type="number" id="solvingFrameRate" min="1" max="144" step="1" value="30"/><br />
<input id="reuseMaze" type="checkbox" checked="true"/><label for="reuseMaze">Reuse current maze on next run</label>