-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtetris.html
executable file
·60 lines (58 loc) · 1.51 KB
/
tetris.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
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="author" content="Jacopo Parvizi" />
<meta name="description" content="Tetris Game" />
<title>Tetris</title>
<style>
body {
background: #202028;
color: #fff;
font-family: sans-serif;
font-size: 2em;
text-align: center;
}
.container{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-right: 40px;
}
.wrapper{
display: flex;
align-items: center;
justify-content: center;
}
#score{
font-size: 40px;
}
canvas {
border: solid .2em #fff;
height: 90vh;
}
</style>
<link rel="stylesheet" href="/assets/vendor/font-awesome/css/font-awesome.css">
</head>
<body>
<div class="wrapper">
<div class="container">
<h2>TETRIS</h2>
<p>Use
<i class="fa fa-arrow-left" ></i>
<i class="fa fa-arrow-up" ></i>
<i class="fa fa-arrow-down" ></i>
<i class="fa fa-arrow-right"></i>
to move</p>
<p>Q and W to rotate</p>
<div style="display: flex;align-items: center;">
<p>SCORE:</p><div id="score"></div>
</div>
</div>
<canvas id="tetris" width="240" height="400" />
</div>
<script src="build/tetris.js"></script>
</body>
</html>