-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtetris.html
123 lines (123 loc) · 3.65 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tetris</title>
<link rel="stylesheet" href="glow.css">
<style>
body, html {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
color: #fff;
}
#game-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
#tetris-board {
border: 2px solid #fff;
}
#next-piece {
margin-left: 20px;
text-align: center;
}
#next-piece-canvas {
border: 1px solid #fff;
}
#congratulations-banner {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 20px;
border-radius: 10px;
text-align: center;
font-size: 24px;
display: none;
z-index: 1000;
}
#pause-menu, #settings-menu {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgba(0, 0, 0, 0.8);
padding: 20px;
border-radius: 10px;
text-align: center;
display: none;
z-index: 1001;
}
#pause-menu button, #settings-menu button {
margin: 10px;
padding: 5px 10px;
}
.theme-option {
display: inline-block;
width: 30px;
height: 30px;
margin: 0 5px;
border: 2px solid white;
border-radius: 50%;
cursor: pointer;
}
#rgb-theme { background: linear-gradient(to right, red, green, blue); }
#dark-theme { background-color: #333; }
#light-theme { background-color: #fff; }
#made-by {
position: fixed;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
text-align: center;
font-size: 14px;
color: #fff;
text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
z-index: 1000;
}
</style>
</head>
<body class="rgb-glow">
<div id="game-container">
<div class="glow-container">
<canvas id="tetris-board"></canvas>
<div>
<p>Puntuación: <span id="score">0</span></p>
</div>
</div>
<div id="next-piece" class="glow-container">
<h3>Siguiente ficha:</h3>
<canvas id="next-piece-canvas" width="120" height="120"></canvas>
</div>
</div>
<div id="congratulations-banner" class="rgb-banner">
¡Felicidades! Ganaste 1000 puntos :D
</div>
<div id="pause-menu">
<h2>Juego Pausado</h2>
<button id="resume-btn">Reanudar</button>
<button id="settings-btn">Configuraciones</button>
</div>
<div id="settings-menu">
<h2>Configuraciones</h2>
<h3>Tema:</h3>
<div>
<span class="theme-option" id="rgb-theme" title="RGB"></span>
<span class="theme-option" id="dark-theme" title="Oscuro"></span>
<span class="theme-option" id="light-theme" title="Claro"></span>
</div>
<button id="back-btn">Volver</button>
</div>
<div id="made-by">
Made by Thisand - So much things coming soon :D
</div>
<script src="figures.js"></script>
<script src="tetris.js"></script>
<script src="server.js"></script>
</body>
</html>