-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
32 lines (28 loc) · 963 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@snake###</title>
</head>
<body>
<pre>
/*
@snake###
the field is a square with a side of <span contenteditable="true" id="side"></span> (changeable)
"@" is the head, "#"s are the body
all letters are fruits
use arrows to control the snake
use space to pause the game
snake starts moving once every <span contenteditable="true" id="initial-delay"></span>ms. (changeable)
it speeds up by eating fruits.
mininal time between moves is <span contenteditable="true" id="min-delay"></span>ms. (changeable)
current score is <span id="score">0</span>
*/
</pre>
<pre id="field"></pre>
<style>body { text-align: center; }</style>
<script src="./index.js"></script>
</body>
</html>