-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (53 loc) · 2.58 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Visualization of the various pathfinding algorithms.">
<title>Pathfinder</title>
<!-- Custom Stylesheets -->
<link rel="stylesheet" href="src/css/buttons.css">
<link rel="stylesheet" href="src/css/dropdown.css">
<link rel="stylesheet" href="src/css/style.css">
</head>
<body>
<div id="userControls">
<div class="dropdown">
<select name="pathfindingAlgo" class="dropdown-select" id="pathfindingAlgo" onchange="initialize();">
<option value="breadth">Breadth First Search</option>
<option value="depth">Depth First Search</option>
<option value="best">Best First Search</option>
<option value="astar">A* Algorithm</option>
<option value="dijkstra">Dijkstra's Algorithm</option>
</select>
</div>
<span id="visualize" type="button" class="btn btn-start" onclick="pathfinder();">Visualize</span>
<br class="mobile-break">
<span id="randomMaze" type="button" class="btn btn-start" onclick="generateMaze('random');">Random Wall Maze</span>
<span id="recdivMaze" type="button" class="btn btn-start" onclick="generateMaze('recdiv');">RecDiv Maze</span>
<span id="randomWeight" type="button" class="btn btn-start" onclick="generateMaze('randomWeight');">Random Weight Maze</span>
<br class="mobile-break">
<span id="resetPathBtn" type="button" class="btn btn-pause" onclick="resetPath();">Clear Path</span>
<span id="resetBtn" type="button" class="btn btn-reset" onclick="reset();">Reset</span>
</div>
<canvas id="main-canvas"></canvas>
</body>
<!-- Custom scripts -->
<!-- Classes -->
<script src="src/js/classes/Cell.js"></script>
<script src="src/js/classes/Board.js"></script>
<!-- All the pathfinding algorithms -->
<script src="src/js/algorithms/breadth.js"></script>
<script src="src/js/algorithms/depth.js"></script>
<script src="src/js/algorithms/best.js"></script>
<script src="src/js/algorithms/astar.js"></script>
<script src="src/js/algorithms/dijkstra.js"></script>
<!-- Main sketch file and other utils -->
<script src="src/js/utils.js"></script>
<script src="src/js/sketch.js"></script>
<!-- Following has to be imported after sketch -->
<script src="src/js/events.js"></script>
<!-- ALl maze generation algorithms -->
<script src="src/js/maze/random.js"></script>
<script src="src/js/maze/recursiveDivision.js"></script>
</html>