-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
152 lines (145 loc) · 8.07 KB
/
index.html
File metadata and controls
152 lines (145 loc) · 8.07 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Algorithm Finder</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-SgOJa3DmI69IUzQ2PVdRZhwQ+dy64/BUtbMJw1MZ8t5HZApcHrRKUc4W0kG879m7" crossorigin="anonymous">
<link href="css/common.css" rel="stylesheet">
<script src="js/index.js"></script>
<script src="js/grid.js"></script>
</head>
<body onload="init()">
<nav class="navbar navbar-expand-md bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="./index.html">Algorithm Finder</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link active" aria-current="page">Create Grid and Select Algorthms</a>
<img src="./icons/arrow-left-right.svg" alt="Next" width="18">
<a class="nav-link disabled" aria-disabled="true">Simulate</a>
</div>
</div>
</div>
</nav>
<div class="container text-center" id="settingsBody">
<div class="row align-items-start">
<div class="col-12" id="legend">
<img src="./icons/emoji-sunglasses-fill.svg" alt="Start" width="18" height="18" class="svgs">
Start
<img src="./icons/door-closed.svg" alt="Target" width="18" height="18" class="svgs">
Target
<img src="./icons/mouse-left-button.svg" alt="MouseLeft" width="18" height="18" class="svgs">
+
<img src="./icons/arrows-move.svg" alt="Move" width="18" height="18" class="svgs">
Edit Cell
(on <img src="./icons/square.svg" alt="Move" width="18" height="18" class="svgs"> to create
<img src="./icons/x-square.svg" alt="Move" width="18" height="18" class="svgs"> Wall)
</div>
<div class="col-2 sticky-top" id="settings">
<ul class="list-group" id="step1">
<li class="list-group-item" id="step1prompt">
1. Create Grid<br>
<a class="settingsPrompt">
Width or height >= 1<br>
The other dimension >= 2<br>
Start and Target must in grid
</a>
</li>
<li class="list-group-item" id="widthGroup">
Width:
<input type="number" id="width" class="gridSize" oninput="checkElementIsInt('width')">
</li>
<li class="list-group-item" id="heightGroup">
Height
<input type="number" id="height" class="gridSize" oninput="checkElementIsInt('height')">
</li>
<li class="list-group-item">
<button class="btn btn-primary" id="createGrid" onclick="createGrid()" disabled>
Create Grid!
</button>
</li>
</ul>
<ul class="list-group" id="step2">
<li class="list-group-item" id="step2prompt">
2. Edit Grid
</li>
<li class="list-group-item">
<button class="btn btn-primary" id="clearWalls" onclick="clearWalls()" disabled>
Clear Walls
</button>
</li>
</ul>
<ul class="list-group" id="step3">
<li class="list-group-item" id="step3prompt">
3. Additional Features
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" id="benchmark">
<label class="form-check-label" for="benchmark">Average Time (x1000)</label>
</li>
</ul>
<ul class="list-group" id="step4">
<li class="list-group-item" id="step4prompt">
4. Select Algorithm(s)<br>
<a class="settingsPrompt">
Select at least 1 algorithm
</a>
</li>
<li class="list-group-item" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover"
data-bs-content="Uses priority queue and Manhattan distance.">
<input class="form-check-input me-1" type="checkbox" value="" id="AStar"
onchange="changeAlgorithm('AStar')">
<label class="form-check-label" for="AStar">A* Search</label>
</li>
<li class="list-group-item" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover"
data-bs-content="Uses priority queue and tentative distance.">
<input class="form-check-input me-1" type="checkbox" value="" id="Dijkstra"
onchange="changeAlgorithm('Dijkstra')">
<label class="form-check-label" for="Dijkstra">Dijkstra's Algorithm</label>
</li>
<li class="list-group-item" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover"
data-bs-content="Search all nodes at the present depth first.">
<input class="form-check-input me-1" type="checkbox" value="" id="BFS"
onchange="changeAlgorithm('BFS')">
<label class="form-check-label" for="BFS">Breadth-first Search (BFS)</label>
</li>
<li class="list-group-item" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover"
data-bs-content="Search all nodes with the largest depth first.">
<input class="form-check-input me-1" type="checkbox" value="" id="DFS"
onchange="changeAlgorithm('DFS')">
<label class="form-check-label" for="DFS">Depth-first Search (DFS)</label>
</li>
<li class="list-group-item"><button class="btn btn-primary" id="simulate" onclick="simulate()"
disabled>Simulate!</button></li>
</ul>
</div>
<div class="col-10" id="gridPreview">
Use panel on left to get started.
</div>
<div class="col-12" id="credit">
luotn © 2025 <a href="https://github.com/luotn/ParallelPathfindingComparision"
target="_blank">Source Code on <img src="./icons/github.svg" alt="github" width="18"
style="vertical-align: text-bottom;" class="svgs"></a>
</div>
</div>
</div>
<!-- Position viewer -->
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="positionViewer" class="toast" role="alert" aria-live="assertive" aria-atomic="true"
data-bs-autohide="false">
<div class="toast-body" id="positionText">
[0, 0]
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/js/bootstrap.bundle.min.js"
integrity="sha384-k6d4wzSIapyDyv1kpU366/PK5hCdSbCRGRCMv+eplOQJWyd1fbcAu9OCUj5zNLiq"
crossorigin="anonymous"></script>
</body>
</html>