-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
64 lines (60 loc) · 1.97 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Snake Game</title>
<link href="styles.css" rel="stylesheet" />
</head>
<body>
<div id="snake-div">
<div id="menu">
<div id="buttons">
<button onclick="game.newGame();">New Game</button><br />
<button id="continue-btn" onclick="game.continue();">Continue</button
><br />
<button onclick="slideDown();">Settings</button><br />
<button onclick="exit()">Exit</button><br />
</div>
<div id="settings">
<form>
<input
type="radio"
class="css-radio"
id="easy"
name="difficulty"
value="120"
checked
/>
<label for="easy" class="css-radio-label">Easy</label>
<input
type="radio"
class="css-radio"
id="medium"
name="difficulty"
value="80"
/>
<label for="medium" class="css-radio-label">Medium</label>
<input
type="radio"
class="css-radio"
id="hard"
name="difficulty"
value="60"
/>
<label for="hard" class="css-radio-label">Hard</label><br />
<input type="checkbox" class="css-checkbox" id="walls" checked />
<label for="walls" class="css-label">Going through walls?</label
><br />
<input type="submit" value="OK" id="save-settings" />
</form>
</div>
</div>
<canvas id="snake-canvas"> </canvas>
<button id="play-btn" onclick="run();">Play</button>
<button id="apple-btn" onclick="snake.randomApple();">New apple</button>
<button id="step-btn" onclick="game.step();">step</button>
<button onclick="game.settings.toggleView()">Test</button>
</div>
<script src="snake.js"></script>
</body>
</html>