-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
49 lines (49 loc) · 1.18 KB
/
Copy pathindex.html
File metadata and controls
49 lines (49 loc) · 1.18 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
<!DOCTYPE html>
<html>
<head>
<title>Snake</title>
<style>
.collision {
background-color: red;
}
.snake {
background-color: black;
}
.food {
background-color: green;
}
#main > table {
box-sizing: border-box;
border-collapse: collapse;
border: 1px solid #ddd;
}
#main > table td {
margin: 0;
padding: 0;
width: 1em;
height: 1em;
border: none;
}
</style>
</head>
<body>
<table><tr>
<td valign="top">
<h1>Snake</h1>
<b>Score:</b> <span id="score"></span>
<b>Rate:</b> <span id="rate"></span>/s
<b>Time:</b> <span id="timer">0</span>s
<b>Hunger:</b> <span id="hunger"></span>
<br>
<button id="new-game">New Game</button>
<button id="ai-toggle">AI: OFF</button>
<button id="pause-toggle">Pause</button>
<span id="ai-status"></span>
<br><br>
<div id="main"></div>
</td>
<td valign="top"><div id="nn-panel"></div></td>
</tr></table>
<script type="module" src="scripts/main.js"></script>
</body>
</html>