-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·73 lines (64 loc) · 2.37 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>
<head>
<title>BEKK Pong!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="pong.css" media="screen, print" rel="stylesheet" type="text/css" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-83414518-1', 'auto');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
</script>
</head>
<body>
<div class="logo">
<img src="bekk_logo.png" width="100">
<div class="logoTextHolder"><span>Pong</span></div>
<div class="timer-container">
<span>Tid: </span><span class="timer" id="timer">00:00</span>
</div>
</div>
</div>
<div class="splash" id="splash-begin">
<div class="splash-content">
<span>Trykk "start" for å begynne!</span>
</div>
</div>
<div class="splash hidden" id="splash-end">
<div class="splash-content">
<span id="end-info"></span>
</div>
</div>
<div class="score-container">
<span class="score" id="score1" >0</span>
<span class="score" id="score2" >0</span>
</div>
<canvas id="game">
</canvas>
<script src="game.js" type="text/javascript"></script>
<script src="pong.js" type="text/javascript"></script>
<script type="text/javascript">
Game.ready(function() {
var size = document.getElementById('size');
var sound = document.getElementById('sound');
var stats = document.getElementById('stats');
var footprints = document.getElementById('footprints');
var predictions = document.getElementById('predictions');
var pong = Game.start('game', Pong, {
sound: true,
stats: false,
footprints: false,
predictions: false
});
Game.addEvent(sound, 'change', function() { pong.enableSound(sound.checked); });
Game.addEvent(stats, 'change', function() { pong.showStats(stats.checked); });
Game.addEvent(footprints, 'change', function() { pong.showFootprints(footprints.checked); });
Game.addEvent(predictions, 'change', function() { pong.showPredictions(predictions.checked); });
});
</script>
</body>
</html>