-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
51 lines (46 loc) · 1.61 KB
/
index.html
File metadata and controls
51 lines (46 loc) · 1.61 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript and DOM API</title>
<link rel="stylesheet" type="text/css" href="game.css" media="all" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
var bear;
var bees;
var updateTimer;
//take start time
lastStingTime = new Date();
</script>
<body onload="start();">
<script src="game.js"></script>
<noscript>
Warning - JavaScript is Disabled.
For full functionality of this page, it is necessary to enable JavaScript.
</noscript>
<div id="title">
<h1>Help the bear escape the bees !</h1>
<p>Bear tries to avoid being stung by <input type="text" id="nbBees" value="1" size="3"> bees by running and
jumping. The objective is to have as few stings as possible!</p>
<p>Adjust the bee's speed <input type="text" id="speedBees" value="50" size="3"> px/ms
<br>Adjust the refresh period <input type="text" id="periodTimer" value="10" size="3"> ms
</p>
<h2>Press left, right, up, down keys to move the bear</h2>
</div>
<div id="scores">
<table>
<tr>
<td>
<p>Stings: [<span id="hits">0</span>]</p>
</td>
<td>
<p>Best duration: [<span id="duration">-</span>]</p>
</td>
</tr>
</table>
</div>
<div id="board">
<img src="images/bear.gif" id="bear" alt="bear">
</div>
</body>
</html>