-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html (Snake)
32 lines (32 loc) · 1.04 KB
/
index.html (Snake)
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
<!DOCTYPE html>
<html lang='en-US'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width'>
<title>Snake</title>
<link href='style.css' rel='stylesheet' type='text/css'>
</head>
<body>
<script src='script.js'></script>
<h1>SNAKE</h1>
<p id='preGameInstructions'>
Instructions:<br>
Select a width, length, and snake color and then click play<br>
Note that 7x7 will give you a 5x5 playing field due to the border cells
</p>
<!-- the game board is put into the tbody with js at runtime -->
<table>
<tbody>
</tbody>
</table>
<h2 class='scoring' id='score'>Your score is: </h2>
<h2 class='scoring' id='highScore'></h2>
<p id='gameInstructions'>
Instructions:<br>
WASD (up, left, down, right) to move<br>
Press spacebar to start (the snake will immediately go left)<br>
Eating a fruit will make you snake longer and increase your score<br>
Running into the walls or yourself will end the game
</p>
</body>
</html>