forked from OMeyer973/PMU-race
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
511 lines (453 loc) · 29.5 KB
/
index.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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
<!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<link rel="icon" type="image/png" href="img/horse.png" size="16x16">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="style.css">
<!--
<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
-->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
<title> PMU RACE </title>
</head>
<!--
regles de syntaxe :
- id et class en minuscule, mots séparés par des tirets "-"
- chaque id est assigné à un élément unique
- chaque élément a un id au max
- tous les noms de variables en anglais
-->
<body>
<div id="wrapper">
<img id="horse-img" alt="The PMU horse" src="img/horse.png"/>
<img id="cards-img" alt="playing cards" src="img/playingCards.png"/>
<h1 id="site-title">PMU IMAC</h1>
<h2 id="site-description">Parions race !</h2>
<!-- les 3 écrans sont sur la même page, dans 3 div. On les active 1 par 1 -->
<div id="menu-screen" class="enter-screen-left">
<!-- dropdown nombre de joueurs -->
<div id="player-number-holder" class="row">
<div class="col-player-id column hor-margin mobile-hidden">
<!-- séparateur vide -->
</div>
<div class="row-player-number row hor-margin">
<h3 class="field-title">Nombre de joueurs</h3>
<select id="player-number" class="interactive-inner hor-margin">
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
</div>
</div>
<!-- liste des joueurs -->
<div id="players-holder">
<!-- joueurs activés par défaut, classes pour désactiver les joueurs : hidden -->
<div id="menu-player1" class="player-row row ver-margin"> <!-- quand tout sera bien défini : recopier cette div le nombre de joueurs -->
<!-- /!\ id uniques ! comme on va copier cette div 8 fois il ne faut pas utiliser de id dedans -->
<div class="col-player-id column hor-margin">
<p class="player-id">Joueur 1</p>
</div>
<div class="col-player-name column hor-margin">
<h3 class ="field-title">Nom</h3><!-- todo : add desktop-hidden class for players 2-8 -->
<input class="interactive-inner player-name" type="text"/>
</div>
<div class="col-player-horse column hor-margin">
<h3 class ="field-title">Poulain</h3><!-- todo : add desktop-hidden class for players 2-8 -->
<select class="interactive-inner player-horse">
<option value="CLUBS">♣</option>
<option value="HEARTS">♥</option>
<option value="DIAMONDS">♦</option>
<option value="SPADES">♠</option>
</select>
</div>
<div class="col-player-bet column hor-margin">
<h3 class ="field-title">Mise</h3> <!-- todo : add desktop-hidden class for players 2-8 -->
<select class="interactive-inner player-bet">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="1000">1000</option>
</select>
</div>
</div>
<div id="menu-player2" class="player-row row ver-margin">
<div class="col-player-id column hor-margin">
<p class="player-id">Joueur 2</p>
</div>
<div class="col-player-name column hor-margin">
<h3 class ="field-title desktop-hidden">Nom</h3>
<input class="interactive-inner player-name" type="text"/>
</div>
<div class="col-player-horse column hor-margin">
<h3 class ="field-title desktop-hidden">Poulain</h3>
<select class="interactive-inner player-horse">
<option value="CLUBS">♣</option>
<option value="HEARTS">♥</option>
<option value="DIAMONDS">♦</option>
<option value="SPADES">♠</option>
</select>
</div>
<div class="col-player-bet column hor-margin">
<h3 class ="field-title desktop-hidden">Mise</h3>
<select class="interactive-inner player-bet">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="1000">1000</option>
</select>
</div>
</div>
<div id="menu-player3" class="player-row row ver-margin hidden">
<div class="col-player-id column hor-margin">
<p class="player-id">Joueur 3</p>
</div>
<div class="col-player-name column hor-margin">
<h3 class ="field-title desktop-hidden">Nom</h3>
<input class="interactive-inner player-name" type="text"/>
</div>
<div class="col-player-horse column hor-margin">
<h3 class ="field-title desktop-hidden">Poulain</h3>
<select class="interactive-inner player-horse">
<option value="CLUBS">♣</option>
<option value="HEARTS">♥</option>
<option value="DIAMONDS">♦</option>
<option value="SPADES">♠</option>
</select>
</div>
<div class="col-player-bet column hor-margin">
<h3 class ="field-title desktop-hidden">Mise</h3>
<select class="interactive-inner player-bet">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="1000">1000</option>
</select>
</div>
</div>
<div id="menu-player4" class="player-row row ver-margin hidden">
<div class="col-player-id column hor-margin">
<p class="player-id">Joueur 4</p>
</div>
<div class="col-player-name column hor-margin">
<h3 class ="field-title desktop-hidden">Nom</h3>
<input class="interactive-inner player-name" type="text"/>
</div>
<div class="col-player-horse column hor-margin">
<h3 class ="field-title desktop-hidden">Poulain</h3>
<select class="interactive-inner player-horse">
<option value="CLUBS">♣</option>
<option value="HEARTS">♥</option>
<option value="DIAMONDS">♦</option>
<option value="SPADES">♠</option>
</select>
</div>
<div class="col-player-bet column hor-margin">
<h3 class ="field-title desktop-hidden">Mise</h3>
<select class="interactive-inner player-bet">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="1000">1000</option>
</select>
</div>
</div>
<div id="menu-player5" class="player-row row ver-margin hidden">
<div class="col-player-id column hor-margin">
<p class="player-id">Joueur 5</p>
</div>
<div class="col-player-name column hor-margin">
<h3 class ="field-title desktop-hidden">Nom</h3>
<input class="interactive-inner player-name" type="text"/>
</div>
<div class="col-player-horse column hor-margin">
<h3 class ="field-title desktop-hidden">Poulain</h3>
<select class="interactive-inner player-horse">
<option value="CLUBS">♣</option>
<option value="HEARTS">♥</option>
<option value="DIAMONDS">♦</option>
<option value="SPADES">♠</option>
</select>
</div>
<div class="col-player-bet column hor-margin">
<h3 class ="field-title desktop-hidden">Mise</h3>
<select class="interactive-inner player-bet">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="1000">1000</option>
</select>
</div>
</div>
<div id="menu-player6" class="player-row row ver-margin hidden">
<div class="col-player-id column hor-margin">
<p class="player-id">Joueur 6</p>
</div>
<div class="col-player-name column hor-margin">
<h3 class ="field-title desktop-hidden">Nom</h3>
<input class="interactive-inner player-name" type="text"/>
</div>
<div class="col-player-horse column hor-margin">
<h3 class ="field-title desktop-hidden">Poulain</h3>
<select class="interactive-inner player-horse">
<option value="CLUBS">♣</option>
<option value="HEARTS">♥</option>
<option value="DIAMONDS">♦</option>
<option value="SPADES">♠</option>
</select>
</div>
<div class="col-player-bet column hor-margin">
<h3 class ="field-title desktop-hidden">Mise</h3>
<select class="interactive-inner player-bet">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="1000">1000</option>
</select>
</div>
</div>
<div id="menu-player7" class="player-row row ver-margin hidden">
<div class="col-player-id column hor-margin">
<p class="player-id">Joueur 7</p>
</div>
<div class="col-player-name column hor-margin">
<h3 class ="field-title desktop-hidden">Nom</h3>
<input class="interactive-inner player-name" type="text"/>
</div>
<div class="col-player-horse column hor-margin">
<h3 class ="field-title desktop-hidden">Poulain</h3>
<select class="interactive-inner player-horse">
<option value="CLUBS">♣</option>
<option value="HEARTS">♥</option>
<option value="DIAMONDS">♦</option>
<option value="SPADES">♠</option>
</select>
</div>
<div class="col-player-bet column hor-margin">
<h3 class ="field-title desktop-hidden">Mise</h3>
<select class="interactive-inner player-bet">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="1000">1000</option>
</select>
</div>
</div>
<div id="menu-player8" class="player-row row ver-margin hidden">
<div class="col-player-id column hor-margin">
<p class="player-id">Joueur 8</p>
</div>
<div class="col-player-name column hor-margin">
<h3 class ="field-title desktop-hidden">Nom</h3>
<input class="interactive-inner player-name" type="text"/>
</div>
<div class="col-player-horse column hor-margin">
<h3 class ="field-title desktop-hidden">Poulain</h3>
<select class="interactive-inner player-horse">
<option value="CLUBS">♣</option>
<option value="HEARTS">♥</option>
<option value="DIAMONDS">♦</option>
<option value="SPADES">♠</option>
</select>
</div>
<div class="col-player-bet column hor-margin">
<h3 class ="field-title desktop-hidden">Mise</h3>
<select class="interactive-inner player-bet">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="1000">1000</option>
</select>
</div>
</div>
</div>
<div class="separator-wide"></div>
<div id="menu-buttons" class="row ver-margin">
<input id="button-start" class="interactive-outer hor-margin" type="submit" value="Démarrer la course !">
<input id="button-rules" class="interactive-outer hor-margin" type="submit" value="C'est quoi les règles ?">
</div>
<div class="separator-wide"></div>
<div id="rules" class="hidden">
<h1 class="rule-title"> Les règles </h1>
<h2 class="rule-subtitle">Gagner la course !</h2>
<p class="rule">
Le but du PMU est simple, comme dans la vraie vie il faut miser sur le poulain qui va gagner la course.
</p>
<h2 class="rule-subtitle">Pour ça : miser sur un poulain</h2>
<p class="rule">
Miser, en nombre de gorgées à boire, sur un poulain : un poulain = un As d'une couleur (trèfle, coeur,...). Une fois que tous les joueurs ont fait leurs mises, la course peut commencer.
</p>
<h2 class="rule-subtitle">Avancer sur la piste</h2>
<p class="rule">
Les poulains sont tous derrière la ligne de départ. À chaque tir de carte dans la pioche, le poulain de la couleur de la carte tirée avance d'une case.
</p>
<h2 class="rule-subtitle">Mais parfois aussi reculer</h3>
<p class="rule">
Une fois que les 4 As ont tous avancé d'un certain nombre de cases, une carte du bord de la piste est retournée. L'As de la couleur de cette carte recule d'une case.
</p>
<h2 class="rule-subtitle">Terminer premier</h2>
<p class="rule">
Le premier poulain à passer la ligne d'arrivée (avancer de 6 cases) gagne la course.
</p>
<h2 class="rule-subtitle">Et boire l'apéro !</h2>
<p class="rule">
Une fois la course finie, les perdants doivent boire le nombre de gorgées qu'ils ont misé : si tu as parié 3 gorgées, tu en bois 3.
</p>
<p class="rule">
Ensuite pour le ou les gagnants, ils doivent distribuer le nombre de gorgées misé mais attention, leur mise a été doublée grâce à leur victoire. Exemple : j'ai misé 3 gorgées donc je dois en distribuer 6.
</p>
<p class="rule">
Mais pas de panique, tout est automatique et les gorgées sont détaillées dans le tableau des résultats à la fin !
</p>
<p class="rule">
Amusez-vous bien ! Et consommez avec Modération, c'est un bon copain.
</p>
<div id="goToTopHolder" class="row ver-margin" >
<input id="button-top" class="interactive-outer hor-margin" type="submit" value="Je veux jouer !">
</div>
</div>
</div>
<div id ="game-screen" class="enter-screen-right hidden">
<div id="deck" class="row-fixed ver-margin">
<div id="deck-face-down" class="deck-card-holder hor-margin">
<img class="deck-card bottom-card" alt="a hidden card" src="img/BK.png"/>
<img class="deck-card top-card" alt="a hidden card" src="img/BK.png"/>
</div>
<div id="deck-face-up" class="deck-card-holder hor-margin">
<img class="deck-card bottom-card" alt="a drawn card" src="img/NoCard.png"/>
<img class="deck-card top-card hidden" alt="a drawn card" src="img/BK.png"/>
</div>
</div>
<div id="tracks-holder">
<img id="game-board" alt="the game board" src="img/GameBoard.png"/>
<div id="track-side" class="row-fixed"><!-- quand tout sera bien défini : recopier cette div le nombre de tours de la course -->
<div class="card-holder track-card">
<img class="card bottom-card" alt="a hidden card" src="img/BK.png"/>
<img class="card top-card drop-track-card hidden" alt="a hidden card" src="img/BK.png"/>
</div>
<div class="card-holder track-card">
<img class="card bottom-card" alt="a hidden card" src="img/BK.png"/>
<img class="card top-card drop-track-card hidden" alt="a hidden card" src="img/BK.png"/>
</div>
<div class="card-holder track-card">
<img class="card bottom-card" alt="a hidden card" src="img/BK.png"/>
<img class="card top-card drop-track-card hidden" alt="a hidden card" src="img/BK.png"/>
</div>
<div class="card-holder track-card">
<img class="card bottom-card" alt="a hidden card" src="img/BK.png"/>
<img class="card top-card drop-track-card hidden" alt="a hidden card" src="img/BK.png"/>
</div>
<div class="card-holder track-card">
<img class="card bottom-card" alt="a hidden card" src="img/BK.png"/>
<img class="card top-card drop-track-card hidden" alt="a hidden card" src="img/BK.png"/>
</div>
</div>
<div id="track1" class="row-fixed track">
<div class="card-holder">
<img class="card drop-track-card hidden" alt="a hidden card" src="img/BK.png"/>
</div>
</div>
<div id="track2" class="row-fixed track">
<div class="card-holder">
<img class="card drop-track-card hidden" alt="a hidden card" src="img/BK.png"/>
</div>
</div>
<div id="track3" class="row-fixed track">
<div class="card-holder">
<img class="card drop-track-card hidden" alt="a hidden card" src="img/BK.png"/>
</div>
</div>
<div id="track4" class="row-fixed track">
<div class="card-holder">
<img class="card drop-track-card hidden" alt="a hidden card" src="img/BK.png"/>
</div>
</div>
</div>
<div class="separator-wide"></div>
<div id="game-commentary-holder" class="row">
<h3 id="game-commentary">La course va bientôt commencer...</h3>
</div>
<div class="separator-wide"></div>
<div id="game-buttons" class="row ver-margin">
<input id="next-turn" class="interactive-outer hor-margin" type="submit" value="Prochain tour">
<input id="see-results" class="interactive-outer hor-margin" type="submit" value="Voir tous les résultats">
</div>
</div>
<div id="results-screen" class="hidden">
<h1> Résultats de la course </h1>
<div id="results-board">
<div class="separator-wide"></div>
<!--to active with the value of the winner-->
<h1 id="winner-horse"> Le gagnant de la course est le pique !</h1>
<div class="separator-wide"></div>
<!--the display will depend on the number of players-->
<h2 class="player-line-result hidden"> <span class="player-name-result"> Joueur X </span> <span class="give-or-take "> bois 1000 coups </span> ! <span class="player-bet-result"> (il a misé 5 sur le coeur) </span></h2>
<h2 class="player-line-result hidden"> <span class="player-name-result"> Joueur XX </span> <span class="give-or-take "> distribue 1000 coups </span> ! <span class="player-bet-result"> (il a misé 5 sur le coeur) </span></h2>
<h2 class="player-line-result hidden"> <span class="player-name-result"> Joueur XX </span> <span class="give-or-take "> distribue 1000 coups </span> ! <span class="player-bet-result"> (il a misé 5 sur le coeur) </span></h2>
<h2 class="player-line-result hidden"> <span class="player-name-result"> Joueur XX </span> <span class="give-or-take "> distribue 1000 coups </span> ! <span class="player-bet-result"> (il a misé 5 sur le coeur) </span></h2>
<h2 class="player-line-result hidden"> <span class="player-name-result"> Joueur XX </span> <span class="give-or-take "> distribue 1000 coups </span> ! <span class="player-bet-result"> (il a misé 5 sur le coeur) </span></h2>
<h2 class="player-line-result hidden"> <span class="player-name-result"> Joueur XX </span> <span class="give-or-take "> distribue 1000 coups </span> ! <span class="player-bet-result"> (il a misé 5 sur le coeur) </span></h2>
<h2 class="player-line-result hidden"> <span class="player-name-result"> Joueur XX </span> <span class="give-or-take "> distribue 1000 coups </span> ! <span class="player-bet-result"> (il a misé 5 sur le coeur) </span></h2>
<h2 class="player-line-result hidden"> <span class="player-name-result"> Joueur XX </span> <span class="give-or-take "> distribue 1000 coups </span> ! <span class="player-bet-result"> (il a misé 5 sur le coeur) </span></h2>
</div>
<div class="separator-wide"></div>
<div id="results-buttons" class="row ver-margin">
<input id="back-to-race" class="interactive-outer hor-margin" type="submit" value="Retour à la piste">
<input id="new-race" class="interactive-outer hor-margin" type="submit" value="Nouvelle course">
</div>
</div>
<div class="footer">
<p id="footer-copyright" class="footer-text"> ©Olivier Meyer & Stella Poulain</p>
<p class="footer-text"> API utilisée : <a href="http://deckofcardsapi.com/"> Deck of Cards API </a> </p>
<img id="imac-logo" alt="Logo IMAC" src="img/logoIMAC.png"/>
<p id="imac-2020" class="footer-text"> IMAC 1 promo 2020 </p>
</div>
</div> <!-- end wrapper -->
<script src="main.js"></script>
</body>
</html>