-
Notifications
You must be signed in to change notification settings - Fork 0
/
pong.html
62 lines (50 loc) · 2.11 KB
/
pong.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript" src="ball.js"></script>
<script type="text/javascript" src="paddle.js"></script>
<script type="text/javascript" src="special_item.js"></script>
<script type="text/javascript" src="player.js"></script>
<script type="text/javascript" src="pong.js"></script>
<link href='http://fonts.googleapis.com/css?family=Orbitron:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="styles.css"/>
</head>
<body>
<div id="main"></div>
<div class="instructions">
<div>** Press space bar to start game **</div>
<div class="playerOne">
<h1>Player 1</h1>
<p>a = Up</p>
<p>z = Down</p>
<p>x = Special</p>
</div>
<div class="playerTwo">
<h1>Player 2</h1>
<p>↑ = Up</p>
<p>↓ = Down</p>
<p>/ = Special</p>
</div>
<div class="specials">
<h1>Specials</h1>
<p>fb = Fast Ball</p>
<p>sb = Slow Ball</p>
<p>cb = Crazy Ball (modifies velocity randomly)</p>
<p>sp = Slow Paddle (slows opponent's paddle temporarily)</p>
</div>
</div>
<script type="text/javascript">
(function () {
"use strict";
(function() {
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
window.requestAnimationFrame = requestAnimationFrame;
})();
var pong = jeffjo.pong.pong;
pong.setupBoard("gameSurface", document.getElementById("main"));
}());
</script>
</body>
</html>