-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
301 lines (270 loc) · 10.1 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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta name="author" content="Hdoc1509" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Five Hands Poker</title>
<link rel="icon" type="image/x-icon" href="src/assets/fhp-ico.ico" />
<!-- Stylesheets -->
<link rel="stylesheet" href="src/css/index.scss" />
<!-- Scripts -->
<script src="src/index.ts" type="module" defer></script>
<script src="src/rules.ts" type="module" defer></script>
<script src="src/version.ts" type="module" defer></script>
<script src="src/dark-theme.ts" type="module" defer></script>
</head>
<body>
<div class="container">
<button id="btn-theme"></button>
<!-- Dark mode logic. DON'T MODIFY -->
<script>
(function (b, l) {
if (l.getItem("theme") === "dark") b.classList.add("dark-mode");
})(document.body, localStorage);
</script>
<!-- MODAL -->
<button class="dialog-open-button">i</button>
<dialog class="dialog-rules">
<button class="dialog-rules__close">X</button>
<h3 class="dialog-rules__title">Game Rules</h3>
<h4 class="dialog-rules__subtitle">Objective</h4>
<p class="dialog-rules__details">
The goal is to get the highest score by playing 5 hands of poker. By
getting 60 points or more, you win the game.
</p>
<h4 class="dialog-rules__subtitle">Punctuation</h4>
<table class="dialog-rules__details dialog-rules__details--punctuation">
<thead>
<tr>
<th>Poker Hand</th>
<th>Points</th>
</tr>
</thead>
<tbody>
<tr>
<td class="dialog-rules__poker-hand">Royal Flush *</td>
<td class="dialog-rules__poker-hand-points">100</td>
</tr>
<tr>
<td class="dialog-rules__poker-hand">Straight Flush *</td>
<td class="dialog-rules__poker-hand-points">75</td>
</tr>
<tr>
<td class="dialog-rules__poker-hand">Four of a Kind</td>
<td class="dialog-rules__poker-hand-points">50</td>
</tr>
<tr>
<td class="dialog-rules__poker-hand">Full House</td>
<td class="dialog-rules__poker-hand-points">25</td>
</tr>
<tr>
<td class="dialog-rules__poker-hand">Flush *</td>
<td class="dialog-rules__poker-hand-points">20</td>
</tr>
<tr>
<td class="dialog-rules__poker-hand">Straight</td>
<td class="dialog-rules__poker-hand-points">15</td>
</tr>
<tr>
<td class="dialog-rules__poker-hand">Three of a Kind</td>
<td class="dialog-rules__poker-hand-points">10</td>
</tr>
<tr>
<td class="dialog-rules__poker-hand">Two Pair</td>
<td class="dialog-rules__poker-hand-points">5</td>
</tr>
<tr>
<td class="dialog-rules__poker-hand">Pair</td>
<td class="dialog-rules__poker-hand-points">2</td>
</tr>
<tr>
<td class="dialog-rules__poker-hand">High Card</td>
<td class="dialog-rules__poker-hand-points">1</td>
</tr>
</tbody>
</table>
<p class="dialog-rules__details">
(<span class="dialog-rules__poker-hand">*</span>) In
<span class="dialog-rules__poker-hand"
>Royal Flush, Straight Flush</span
>
and <span class="dialog-rules__poker-hand">Flush</span>, all five
cards must be of the same suit.
</p>
<h4 class="dialog-rules__subtitle">Instructions</h4>
<p class="dialog-rules__details">
At the beginning of the game, 5 cards will be placed on the table,
thus beginning the first hand.
</p>
<p class="dialog-rules__details">
In each hand, the player can change up to a maximum of 3 cards. The
combinations of change will be at the discretion of the player.
</p>
<p class="dialog-rules__details">
Once the player wants to keep the hand of can no longer change cards,
the hand is finished and the player receives the points according to
the hand achieved. Then the cards on the table are removed and 5 more
are dealt.
</p>
<p class="dialog-rules__details">
The game continues in the same way until it reaches the end of the 5th
hand and the player's total points and description of each hand are
displayed, along the final result of the game.
</p>
<h4 class="dialog-rules__subtitle">Ability</h4>
<p class="dialog-rules__details">
This is a game that combines dexterity and strategy with a bit of
luck.
</p>
<p class="dialog-rules__game-version">
<a id="game-version" target="_blank" rel="noopener noreferrer"></a>
</p>
</dialog>
<!-- END OF MODAL -->
<!-- HEADER -->
<header class="row">
<h1 class="main-title">Five Hands Poker</h1>
</header>
<!-- END OF HEADER -->
<!-- MAIN -->
<main class="row">
<!-- BUTTONS -->
<section class="buttons">
<button id="start-button" class="buttons__action-button">
Start
</button>
<button id="change-button" class="buttons__action-button hidden">
Change
</button>
<button id="stay-button" class="buttons__action-button hidden">
Stay
</button>
<button id="next-hand-button" class="buttons__action-button hidden">
Next Hand
</button>
<button id="play-again-button" class="buttons__action-button hidden">
Play Again
</button>
</section>
<!-- END OF BUTTONS -->
<!-- CARDS -->
<section class="cards-group">
<!-- GAME-RESULT -->
<dialog id="game-result" class="dialog-game-result"></dialog>
<!-- END OF GAME-RESULT -->
<dialog id="game-result" class="dialog-game-result"></dialog>
<div id="card1" class="card">
<p class="card__info card__info--top"></p>
<p class="card__suit"></p>
<p class="card__info card__info--bottom"></p>
</div>
<div id="card2" class="card">
<p class="card__info card__info--top"></p>
<p class="card__suit"></p>
<p class="card__info card__info--bottom"></p>
</div>
<div id="card3" class="card">
<p class="card__info card__info--top"></p>
<p class="card__suit"></p>
<p class="card__info card__info--bottom"></p>
</div>
<div id="card4" class="card">
<p class="card__info card__info--top"></p>
<p class="card__suit"></p>
<p class="card__info card__info--bottom"></p>
</div>
<div id="card5" class="card">
<p class="card__info card__info--top"></p>
<p class="card__suit"></p>
<p class="card__info card__info--bottom"></p>
</div>
</section>
<!-- END OF CARDS -->
<!-- GAME INFO -->
<section class="game-info">
<!-- POINTS -->
<div class="points-details">
<h3 class="points-details__title">Player points</h3>
<p class="points-details__hand">
Hand 1:
<span id="hand1-points" class="points-details__hand-point">?</span
><br />
<span
id="hand1-cards"
class="points-details__hand-cards hidden"
></span>
</p>
<p class="points-details__hand">
Hand 2:
<span id="hand2-points" class="points-details__hand-point">?</span
><br />
<span
id="hand2-cards"
class="points-details__hand-cards hidden"
></span>
</p>
<p class="points-details__hand">
Hand 3:
<span id="hand3-points" class="points-details__hand-point">?</span
><br />
<span
id="hand3-cards"
class="points-details__hand-cards hidden"
></span>
</p>
<p class="points-details__hand">
Hand 4:
<span id="hand4-points" class="points-details__hand-point">?</span
><br />
<span
id="hand4-cards"
class="points-details__hand-cards hidden"
></span>
</p>
<p class="points-details__hand">
Hand 5:
<span id="hand5-points" class="points-details__hand-point">?</span
><br />
<span
id="hand5-cards"
class="points-details__hand-cards hidden"
></span>
</p>
<p id="total-points" class="points-details__total hidden">
Total:
<span
id="total-hands-points"
class="section__total-hands-points"
></span>
</p>
</div>
<!-- END OF POINTS -->
<!-- REMAINING CARDS -->
<div class="remaining-cards">
<h3 class="remaining-cards__title">Remaining Cards</h3>
<p id="remaining-cards-counter" class="remaining-cards__counter">
?
</p>
</div>
<!-- END OF REMAINING CARDS -->
</section>
<!-- END OF GAME INFO -->
</main>
<!-- END OF MAIN -->
<!-- FOOTER -->
<footer class="credits">
<p class="credits__author">
© 2022
<a
href="https://github.com/Hdoc1509"
target="_blank"
rel="noopener noreferrer"
>Hdoc</a
>
</p>
</footer>
<!-- END OF FOOTER -->
</div>
</body>
</html>