forked from Windstalker/CanvasSnake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
44 lines (41 loc) · 1.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<title>Canvas Snake</title>
<link rel="stylesheet" href="css/style.css"/>
<script src="src/loader.js"></script>
<script src="src/raf.js"></script>
<script src="src/snake.js"></script>
</head>
<body>
<div id="game"></div>
<!-- this div is the homepage of the game, where instructions are displayed and where you can start to play the game -->
<div id="game_ui">
<h1 id="title">CanvasSnake</h1>
<div id="controls">
<div class="control"><h3>move up:</h3><span>w / arrow up</span></div>
<div class="control"><h3>move down:</h3><span>s / arrow down</span></div>
<div class="control"><h3>move left:</h3><span>a / arrow left</span></div>
<div class="control"><h3>move right:</h3><span>d / arrow right</span></div>
<div class="control"><h3>pause:</h3><span>p</span></div>
<div class="control"><h3>restart:</h3><span>r</span></div>
</div>
<form id="gender">
<span>Male</span><input name="gender" type="radio" checked="true" id="male_gender"><br>
<span>Female</span><input name="gender" type="radio" id="female_gender">
</form>
<div class="button" id="play" onclick="ui_playGame()">Play</div>
</div>
<!--
this happens now in ui.js
<script>
var snakeGame = new SnakeGame('#game', 501, 305);
</script>
-->
<script src="src/ui.js"></script>
</body>
</html>