-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.html
37 lines (34 loc) · 1.24 KB
/
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./src/game.css" />
<title>Tetris</title>
</head>
<body>
<div id="main">
<div id="information">
<p style="color:#00fbff">Игрок: <span id="player_name"></span></p>
<p style="color:#00fbff">Счет: <span id="score">0</span></p>
<p style="color:#00fbff">Уровень: <span id="level">1</span></p>
<p>Следующая фигура:</p>
<canvas id="figure_preview"></canvas>
<p style="color:#ffff00">
Управление:<br>
Стрелка влево - влево<br>
Стрелка вправо - вправо<br>
Стрелка вниз - ускорение падения<br>
Стрелка вверх - поворот<br>
</p>
</div>
<div id="playground_box">
<canvas id="playground"></canvas>
</div>
</div>
<script>
document.getElementById("player_name").textContent = localStorage.getItem("username")
</script>
<script type="module" src="./src/main.js"></script>
</body>
</html>