This repository has been archived by the owner on Aug 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpetris.html
33 lines (33 loc) · 1.54 KB
/
petris.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
<html>
<head><title>Petris</title>
<script language="JavaScript" type="text/javascript" src="petris.js"></script>
</head>
<body onload="initGame();" style="text-align: center;">
<div style="margin-left: auto; margin-right: auto; width:450px">
<div style="text-align: left">
<h1>Petris</h1>
<div style="float:left"><canvas id="gameCanvas" width="200" height="300" style="border: 1px solid black">HTML5 canvas not supported !</canvas></div>
<div style="float: left; margin-left: 10px;">
<div><input type="button" value="Start game" onclick="startGame()"/></div>
<div>Score :<span id="scoreDiv">0</span></div>
<div>Level :<span id="levelDiv">0</span></div>
<div> </div>
<div>Use the arrow keys:</div>
<div><b>Up</b> rotates block</div>
<div><b>Down</b> accelerates block descent</div>
<div><b>Left/Right</b> move block</div>
<!--
<div><input type="button" value="Rotate" onmousedown="actionRotatePiece(-1);"/></div>
<div><input type="button" value="Left" onmousedown="actionMovePiece(-1);" onmouseup="actionMovePiece(0);" />
<input type="button" value="Right" onmousedown="actionMovePiece(1);" onmouseup="actionMovePiece(0);" /></div>
<div><input type="button" value="Down" onmousedown="actionDropPiece(true);" onmouseup="actionDropPiece(false);"/></div>
-->
<div> </div>
<div style="clear: both; font-size: 8pt;">By Vincent Petry using the HTML5 canvas</div>
<div style="clear: both; font-size: 8pt;"><a href="https://github.com/PVince81/petris">Github project page</a></div>
</div>
</div>
</div>
</div>
</body>
</html>