-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
56 lines (49 loc) · 2.74 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
<html>
<head><title>Simple Snake Game</title>
<meta name=viewport content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<link rel="stylesheet" href="css/normalize.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/h5bp.css">
<script src="snake.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-27120534-1', 'auto');
ga('send', 'pageview');
</script>
<nav class="navbar navbar-default">
<a class="navbar-brand self-align-center" href="/"><strong> A Simple Snake-Game based on A* algorithm </strong></a>
</nav>
</head>
<body onload="init();">
<input type="button" class="btn btn-success" style="width: 7.5%" value="Start" onclick="start();">
<input type="button" class="btn btn-danger" style="width: 7.5%" value="Stop" onclick="stop();">
<input type="button" class="btn btn-success" style="width: 8%" value="Pause" onclick="pause();">
<input type="button" class="btn btn-success" style="width: 8%" value="Resume" onclick="resume();"> <br><br>
<select id="search" style="width: 33.2%" onchange="change_search();">
<option>BFS</option>
<option>DFS</option>
<option>A* - H1</option>
<option>A* - H2</option>
<option>A* - (H1+H2)/2</option>
</select>
<br>
<div class="pokar">
<canvas id="canvas" width="500" height="500"></canvas>
<div id="stats" style="float:right;width:300px;">
<h1><strong>Food Eaten: <span id="food_val"></span></strong></h1>
<h1><strong>Moves: <span id="moves_val"></span></strong></h1>
<h1><strong>Average Moves: <span id="avg_moves_val"></span></strong></h1>
<h1><strong>Average Nodes Processed: <span id="avg_nodes_val"></span></strong></h1>
</div>
</div>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>