-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
39 lines (39 loc) · 1.63 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dijkstra's Pathfinding Visualizer</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Dijkstra's Pathfinding Visualizer</h1>
<div class="container">
<div id="instructions">
<h2>Instructions</h2>
<ol>
<li>Click on the grid to set the start point.</li>
<li>Click again to set the end point.</li>
<li>Adjust speed and click solve to visualize the algorithm.</li>
</ol>
</div>
<div id="main-content">
<div id="grid"></div>
<div id="controls">
<div class="control-group">
<label for="speed">Speed:</label>
<input type="range" id="speed" min="1" max="100" value="50">
</div>
<button id="reset">Reset</button>
<button id="solve">Solve</button>
<div id="timer">Time: <span id="time">0</span> ms</div>
</div>
</div>
<div id="info">
<h2>About Dijkstra's Algorithm</h2>
<p>Dijkstra's algorithm is a graph search algorithm that solves the single-source shortest path problem for a graph with non-negative edge weights, producing a shortest path tree. This visualizer demonstrates how the algorithm explores the grid to find the shortest path between the start and end points.</p>
</div>
</div>
<script src="script.js"></script>
</body>
</html>