-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
246 lines (176 loc) · 11.3 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
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Algorithm Visualizer</title>
<link rel="stylesheet" href="sorting.css">
<script defer type="text/javascript" src="js files/sorting/sorting.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script type="text/javascript" src="js files/pathfinding/pathfinding.js"></script>
</head>
<body style="background-color: #a56ae5;">
<ul class="nav nav-tabs nav-justified" id="tabs" role="tablist">
<li class="nav-item" role="presentation">
<a
class="nav-link active extra"
id="sorting"
data-toggle="tab"
href="#sorting-algorithm-tab"
role="tab"
aria-controls="ex3-tabs-1"
aria-selected="true"><B>Sorting Algorithm</B></a>
</li>
<li class="nav-item" role="presentation">
<a
class="nav-link extra"
id="path-finder"
data-toggle="tab"
href="#pathfinding-algorithm-tab"
role="tab"
aria-controls="ex3-tabs-2"
aria-selected="false"><B>Pathfinding Algorithm</B></a>
</li>
</ul>
<div class="tab-content" id="ex2-content">
<div
class="tab-pane fade show active"
style="background-color: rgb(217, 222, 70); padding: 10px;"
id="sorting-algorithm-tab"
role="tabpanel"
aria-labelledby="ex3-tab-1">
<header class="tab-content" id="sort-content">
<nav id="nav_bar">
<div class="row" style="padding: 10px;">
<div class="d-sm-flex scol" id="new_Array">
<button type="button" class="btn btn-outline-success btn-dark newArray">Generate Array</button>
<button type="button" class="btn btn-outline-success btn-dark reverseArray">Reverse Array</button>
</div>
<div class="col" id="input">
<span id="array_size">Size of Array:
<input id="arr_size" type="range" min="10" max="100" step=1 value=50>
</span>
<span id="array_speed">Speed:
<input id="arr_speed" type="range" min="10" max="250" stepDown=10 value=50>
</span>
</div>
<div class="d-sm-flex justify-content-end scol">
<button type="button" class="btn-outline-primary btn-dark bubbleSort">Bubble</button>
<button type="button" class="btn-outline-primary btn-dark insertionSort">Insertion</button>
<button type="button" class="btn-outline-primary btn-dark selectionSort">Selection</button>
<button type="button" class="btn-outline-primary btn-dark mergeSort">Merge</button>
<button type="button" class="btn-outline-primary btn-dark quickSort">Quick</button>
</div>
</div>
</nav>
</header>
<body class="p-3 mb-3 text-white ">
<div id="bars" class="flex-container"></div>
<script src="js files/sorting/bubblesort.js"></script>
<script src="js files/sorting/insertionsort.js"></script>
<script src='js files/sorting/selectionsort.js'></script>
<script src='js files/sorting/mergesort.js'></script>
<script src='js files/sorting/quicksort.js'></script>
</body>
</div>
<div
class="tab-pane fade"
style="background-color: white;"
id="pathfinding-algorithm-tab"
role="tabpanel"
aria-labelledby="ex3-tab-2">
<body style="font-family: 'Raleway', sans-serif; background-color:white;">
<div class="container-fluid w-100 m-0 p-0" style="height: 100vh;">
<nav class="navbar navbar-expand-lg navbar-light bg-light text-dark">
<div class="container">
<h3 ><strong>Path Finder</strong></h3>
<button class="navbar-toggler" type="button" data-toggler="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-center" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto nav-fill w-100 align-items-center">
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Algorithms
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#" onclick="dropdown(event)">Dijkstra</a>
<a class="dropdown-item" href="#" onclick="dropdown(event)">A* Search</a>
<a class="dropdown-item" href="#" onclick="dropdown(event)">Breadth First Search</a>
<a class="dropdown-item" href="#" onclick="dropdown(event)">Depth First Search</a>
</div>
</li>
<li class="nav-item">
<button class="btn btn-dark my-2 my-sm-0" id="startButton" type="submit">Start</button>
</li>
<li class="nav-item active">
<a class="nav-link" href="#" onclick="createmaze()">Create Maze<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#" onclick="resetCanvas()">Clear<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#" onclick="clear_Canvas()">Reset<span class="sr-only">(current)</span></a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid pt-4 pb-0">
<div class="row text-center text-dark" style="font-size: 23px;">
<div class="col-sm-6 col-md">
<div>
<span class="square" style="height:20px; width:20px; background-color: green; display:inline-block;"></span>
Source
</div>
</div>
<div class="col-sm-6 col-md">
<div>
<span class="square" style="height:20px; width:20px; background-color: red; display:inline-block;"></span>
Destination
</div>
</div>
<div class="col-sm-6 col-md">
<div>
<span class="square" style="height:20px; width:20px; background-color: grey; display:inline-block;"></span>
Walls
</div>
</div>
<div class="col-sm-6 col-md">
<div>
<span class="square" style="height:20px; width:20px; background-color: #1E90FF; display:inline-block;"></span>
Unexplored
</div>
</div>
<div class="col-sm-6 col-md">
<div>
<span class="square" style="height:20px; width:20px; background-color: rgba(0, 0, 255 , 0.4); display:inline-block;"></span>
Explored
</div>
</div>
<div class="col-sm-6 col-md">
<div>
<span class="square" style="height:5px; width:30px; background-color: #FF1493; display:inline-block;"></span>
Path
</div>
</div>
</div>
</div>
<div id="sketch01" style="position: relative;" > </div>
</div>
</body>
</div>
</div>
</body>
</html>