-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
73 lines (68 loc) · 3.22 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>A* in JS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Fira+Mono" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="screen" href="styles\bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="styles\main.css" />
<script src = "scripts\popper.min.js"></script>
<script src = "scripts\jquery-3.3.1.min.js"></script>
<script src = "scripts\bootstrap.min.js"></script>
<script src = "scripts\p5.js"></script>
<script src = "classes\binaryHeap.js"></script>
<script src = "classes\cell.js" ></script>
<script src = "scripts\mainHeap.js" ></script>
</head>
<body>
<div style = "margin-top: 10px; margin-bottom: 10px;" class = "container-fluid">
<div class = "row">
<div class = "col-sm-4">
<h4>
Current:
</h4>
<ul>
<li><div class = "cube startingCube"></div> is the starting point;</li>
<li><div class = "cube endingCube"></div> is the ending point;</li>
<li><div class = "cube obstacleCube"></div> are the walls;</li>
<li><div class = "cube opensetCube"></div> is the open set;</li>
<li><div class = "cube closedsetCube"></div> is the closed set;</li>
<li>Click and drag from a white cell or from a wall to add and remove walls;</li>
<li>Click and drag the starting point or the ending point to reposition them;</li>
</ul>
<div class = "btn-toolbar-vertical">
<button class = "btn btn-dark btn-block" onclick="startSimulation()" id = "startButton" >Start</button>
<button class = "btn btn-dark btn-block" disabled = "true" onclick = "restart();" id = "restartButton">Restart</button>
<button class = "btn btn-dark btn-block" onclick = "newMaze();" id = "refreshButton">New</button>
<br>
<div class = "dropdown btn-block">
<button type = "button" class = "btn btn-dark dropdown-toggle btn-block" id = "dropDownSpeed" data-toggle = "dropdown" aria-haspopup="true" aria-expanded="true">
Speed (fps) |
<span id = "currentSpeed"> 30fps </span>
<span class = "caret"></span>
</button>
<div class = "dropdown-menu" aria-labelledby="dropDownSpeed">
<button id = "10fps" class = "btn-block dropdown-item" onclick="changeSpeed(this.id);">10</button>
<button id = "30fps" class = "btn-block dropdown-item active" onclick="changeSpeed(this.id);">30</button>
<button id = "60fps" class = "btn-block dropdown-item" onclick="changeSpeed(this.id);">60</button>
</div>
</div>
<br>
<button class = "btn btn-dark btn-block" onclick="gridToggle()">Toggle Grid</button>
<button class = "btn btn-dark btn-block" onclick="clearWalls()" id = "clearButton" >Clear Walls</button>
<button class = "btn btn-dark btn-block" onclick="generateWalls()" id = "generateWallsButton" >New Walls</button>
</div>
<br>
<p>
<span>The Shortest path is: </span><span id = "pathLength">0</span><span> cells long;</span>
<h1 hidden = "true" id = "failCase">It doesn't exists!</h1>
</p>
</div>
<div id = "p5Canvas" class = "col-sm-8">
</div>
<div class = "col-sm"></div>
</div>
</div>
</body>
</html>