-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
58 lines (57 loc) · 1.09 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>SNEK EAT FRUT</title>
<style>
body{
background-color:LightGray;
text-align:center;
}
button{
padding: 10px;
font-size: 120%;
}
#logTable{
width: 50%;
margin-left:auto;
margin-right:auto;
border-collapse: collapse;
border: solid black 1px;
}
#logTable tr:nth-child(2){
font-weight: bold;
}
</style>
</head>
<body onload="onload()">
<h2>SNEK EAT FRUT</h2>
<p>
<button type="button" id="newGameButton">NEW GAME</button>
<button type="button" id="pauseToggle">PAUSE</button>
</p>
<p>Use: <b>←↓↑→</b>, <b>WASD</b> or <b>HJKL</b> to turn, <b>p</b> to pause</p>
<canvas id="canvas"></canvas>
<table id="logTable">
<tbody>
<tr>
<td>State</td>
<td>Score</td>
<td>Length</td>
<td>Snek</td>
<td>Frut</td>
<td>Tick</td>
</tr>
<tr>
<td id="state"></td>
<td id="score"></td>
<td id="length"></td>
<td id="snake"></td>
<td id="fruit"></td>
<td id="tick"></td>
</tr>
</tbody>
</table>
<script src="./jsnake.js"></script>
</body>
</html>