-
Notifications
You must be signed in to change notification settings - Fork 0
/
squash-game.html
48 lines (47 loc) · 1.66 KB
/
squash-game.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
<!doctype html>
<!-- Copyright Chris Mills
https://developer.mozilla.org/en-US/profiles/chrisdavidmills,
Mozilla Development Network and individual MDN contributors.
Arbitrarily modified by David Corking.
Unless otherwise indicated, the content is available under the
terms of the Creative Commons Attribution-ShareAlike license
(CC-BY-SA), v2.5 or any later version.
http://creativecommons.org/licenses/by-sa/2.5/ -->
<!-- Made by following the tutorial at
https://developer.mozilla.org/en-US/docs/Games/Workflows/2D_Breakout_game_pure_JavaScript
-->
<html>
<head>
<meta charset="utf-8"/ >
<title>Squash game from Mozilla tutorial</title>
<style>
* { padding: 0; margin: 0; }
canvas {background: #eee;
display: block;
margin: 0 auto;}
</style>
</head>
<body>
<h1>Solo squash game
<canvas id="myCanvas" width="480" height="320"></canvas>
</h1>
<p>
Adapted from the
<a href="https://developer.mozilla.org/en-US/docs/Games/Workflows/2D_Breakout_game_pure_JavaScript">
2D Breakout game tutorial</a>
by Chris Mills and others on Mozilla Development
Network.
</p>
<p>
Press space to pause. Left and right arrows to move paddle. Sorry this
doesn't work with touch screens.
</p>
<p>
Unless otherwise indicated, the content is available under the
terms of the Creative Commons Attribution-ShareAlike license
(CC-BY-SA), v2.5 or any later version.
<a href="http://creativecommons.org/licenses/by-sa/2.5/">http://creativecommons.org/licenses/by-sa/2.5/</a>
</p>
</body>
<script type="text/javascript" src="./squash-game.js"></script>
</html>