-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.html
326 lines (296 loc) · 15.9 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!DOCTYPE html>
<html lang="es">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="assets/icons/two-dices-alt.svg" />
<!-- Bootstrap CSS -->
<link href="/css/main.min.css" rel="stylesheet" />
<link rel="stylesheet" href="css/style.css" />
<title>Kiriki Web App - Juego</title>
</head>
<body>
<header>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="games.html">
<img src="assets/logo.svg" alt="Kiriki logo">
<img src="assets/kiriki-brand-light.svg" alt="Title"/>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link active" href="games.html" id="playNav"> Jugar!</a></li>
<li class="nav-item"><a class="btn btn-primary me-1" href="login.html" id="loginNav"> Iniciar
Sesión</a></li>
<li class="nav-item"><a class="btn btn-secondary" href="register.html" id="registerNav">
Registrarse</a></li>
<li class="nav-item"><a class="btn btn-outline-dark bg-warning" id="logoutNav"> Cerrar
Sesión</a>
</ul>
</div>
</div>
</nav>
</header>
<main>
<div class="container bg-light">
<div class="row d-flex justify-content-center bg-light">
<div class="col fs-5 text-center my-4">
<h1 id="gameName">Nombre del juego</h1>
</div>
<div class="col fs-5 text-center my-4">
<a class="btn btn-secondary mb-1" href="games.html">
<i class="fa fa-arrow-left"></i>
Volver
</a>
<button class="btn btn-primary mb-1" id="valueTableButton">Tabla de Valores
<i class="fa fa-caret-down"></i>
</button>
</div>
</div>
<div class="row d-flex justify-content-center bg-warning" id="decide">
<div class="col fs-5 text-center my-4" id="lastValue"></div>
<div class="row mb-4 justify-content-center">
<div class="col-6 mx-5 dice flip" id="lastImage1"></div>
<div class="col-6 mx-5 dice flip" id="lastImage2"></div>
</div>
<div class="row mb-4 justify-content-center" id="decideButtons">
<div class="col fs-5 text-center mb-4">¿Aceptas el valor?</div>
<div class="row justify-content-center">
<div class="col text-center">
<button class="btn btn-success zoom" id="acceptButton"><i
class="fa-solid fa-check fa-xl me-1 text-nowrap"></i> Aceptar valor</button>
</div>
<div class="col text-center">
<button class="btn btn-danger zoom" id="rejectButton"><i
class="fa-solid fa-xmark fa-xl me-1"></i> Destapar dados</button>
</div>
</div>
</div>
</div>
<div class="row justify-content-center bg-success" id="roll">
<div class="col text-center mb-4">
<h1 class="my-4 text-light">Lanza los dados!</h1>
<button class="btn btn-lg btn-dark shake-alt" id="rollDices" name="tirar">
<img class="turned-30" src="assets/icons/two-dices.svg" width="64px">
</button>
</div>
</div>
<div class="row d-flex justify-content-center bg-warning" id="bid">
<div class="row">
<div class="col fs-5 text-center my-4">
<div class="col fs-5 text-center mb-4">El valor de tu tirada es <span class="fw-bold"
id="rollValue"></span></div>
<div class="row mb-4 justify-content-center">
<div class="col-6 mx-5 dice flip" id="roll1"></div>
<div class="col-6 mx-5 dice flip" id="roll2"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-12 fs-5 text-center mb-4">¿Que valor quieres anunciar?</div>
<div class="col-6 text-center mb-4">
<div class="row justify-content-center">
<button class="btn btn-secondary btn-modifier" id="moreValue1">
<i class="fa-solid fa-angle-up fa-xl"></i>
</button>
<input type="hidden" id="bid1" value="1" />
<div class="col-6 mx-5 dice dice-1" id="bid-image-1"></div>
<button class="btn btn-secondary btn-modifier" id="lessValue1">
<i class="fa-solid fa-angle-down fa-xl"></i>
</button>
</div>
</div>
<div class="col-6 text-center mb-4">
<div class="row justify-content-center">
<button class="btn btn-secondary btn-modifier" id="moreValue2">
<i class="fa-solid fa-angle-up fa-xl"></i>
</button>
<input type="hidden" id="bid2" value="1" />
<div class="col-6 mx-5 dice dice-1" id="bid-image-2"></div>
<button class="btn btn-secondary btn-modifier" id="lessValue2">
<i class="fa-solid fa-angle-down fa-xl"></i>
</button>
</div>
</div>
<div class="col-12 text-center mb-4">
<button class="btn btn-primary btn-lg zoom" id="announce">
<i class="fa-solid fa-comment-dots fa-xl me-2"></i>Anunciar valor
</button>
</div>
</div>
</div>
<div class="row justify-content-center bg-success" id="spectate">.
<div class="row d-none" id="yourBidResult">
<div class="col text-center mb-4">
<h1 class="my-4 text-light">Dices que has sacado <span class="fst-italic fw-bold"
id="yourBidValue"></span></h1>
<div class="row mb-4 justify-content-center">
<div class="col-6 mx-5 dice flip" id="yourBid1"></div>
<div class="col-6 mx-5 dice flip" id="yourBid2"></div>
</div>
</div>
</div>
<div class="row">
<div class="col text-center mb-4">
<h1 class="my-4 text-light">Es el turno de <span class="fst-italic" id="turnOf"></span></h1>
</div>
</div>
</div>
</div>
</main>
<div class="modal fade" id="resultModal" tabindex="-1" data-bs-keyboard="false" aria-labelledby="resultModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="whosLoser"></h3>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<h5 id="loserResult"></h5>
<div class="row mt-4 justify-content-center">
<div class="col-6 mx-5 dice flip" id="pointDice1"></div>
<div class="col-6 mx-5 dice flip" id="pointDice2"></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Cerrar</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="winnerModal" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false" aria-labelledby="winnerModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Partida finalizada</h3>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<p>
El ganador es de esta partida es <span class="fst-italic fw-bold" id="winner"></span>
</p>
</div>
<div class="modal-footer">
<!-- Button to return to games.html -->
<a href="games.html" class="btn btn-primary">Volver</a>
</div>
</div>
</div>
</div>
<div class="modal fade" id="errorModal" tabindex="-1" data-bs-keyboard="false" aria-labelledby="errorModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Error!</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="alert alert-danger d-flex align-items-center" role="alert">
<i class="fa-solid fa-triangle-exclamation fa-lg me-2"></i>
<div id="errorMessage">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Cerrar</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="valueTableModal" tabindex="-1" data-bs-keyboard="false"
aria-labelledby="valueTableModal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Valores</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-center fw-bold ">
<ol class="list-group list-group-numbered " id="valueTable">
<li class="list-group-item d-flex align-items-start bg-primary text-light">
<div class="ms-2 me-auto">
Sumas simples
<div class="d-flex mt-2 gap-1 gap-md-3 fs-7">
<span class="h-25 md-dice">1</span>
<span class="h-25 md-dice">2</span>
<span class="h-25 md-dice">3</span>
<span class="h-25 md-dice">4</span>
<span class="h-25 md-dice">5</span>
<span class="h-25 md-dice">6</span>
</div>
<div class="d-flex gap-1 gap-md-3">
<span class="md-dice dice-1"></span>
<span class="md-dice dice-2"></span>
<span class="md-dice dice-3"></span>
<span class="md-dice dice-4"></span>
<span class="md-dice dice-5"></span>
<span class="md-dice dice-6"></span>
</div>
<div class="d-flex gap-1 gap-md-3 fs-7 text-nowrap">
<span class="h-25 md-dice">Negras</span>
<span class="h-25 md-dice">Rojas</span>
<span class="h-25 md-dice">Jota</span>
<span class="h-25 md-dice">Dama</span>
<span class="h-25 md-dice">Rey</span>
<span class="h-25 md-dice">As</span>
</div>
</div>
</li>
<li class="list-group-item d-flex align-items-start bg-primary text-light">
<div class="ms-2 me-auto">
"Tocho", ladrillazo, ladrillo
<div class="d-flex mt-2 gap-1 gap-md-3">
<span class="md-dice dice-5"></span>
<span class="md-dice dice-6"></span>
</div>
</div>
</li>
<li class="list-group-item d-flex align-items-start bg-primary text-light">
<div class="ms-2 me-auto">
Parejas (dos iguales)
</div>
</li>
<li class="list-group-item d-flex align-items-start bg-primary text-light">
<div class="ms-2 me-auto">
Kiriki
<div class="d-flex mt-2 gap-1 gap-md-3">
<span class="md-dice dice-1"></span>
<span class="md-dice dice-2"></span>
</div>
</div>
</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
-->
<!-- JQuery -->
<script src="js/jquery-3.6.0.min.js"></script>
<!-- Font Awesome Icons -->
<script src="https://kit.fontawesome.com/79f56e797f.js" crossorigin="anonymous"></script>
<!-- My JS -->
<script src="js/nav.js"></script>
<script src="js/game.js"></script>
</body>
</html>