-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
41 lines (37 loc) · 1.07 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
<!DOCTYPE html>
<html>
<head>
<title>Asteroids</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script src="keymaster.js"></script>
<script src="movingObject.js"></script>
<script src="asteroid.js"></script>
<script src="game.js"></script>
<script src="ship.js"></script>
<script src="bullet.js"></script>
</head>
<body>
<div id="title">
<h3>Asteroids!</h3>
<p>To play:</p>
<ul>
<li>Up key to start / increase speed</li>
<li>Down key to slow down / stop</li>
<li>Left and right keys to turn relative to ship direction</li>
<li>Space bar to shoot</li>
</ul>
</div>
<div id="main">
<canvas width="500" height="500"></canvas>
<script>
var canvas = document.getElementsByTagName("canvas")[0];
var ctx = canvas.getContext("2d");
var g1 = new Asteroids.Game(ctx);
g1.start();
</script>
</div>
<div id="controls">
<button onclick="window.location.href=''">Refresh</button>
</div>
</body>
</html>