-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
315 lines (258 loc) · 12 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blackjack</title>
<!-- Imports -->
<!-- Style -->
<link rel="stylesheet" href="style.css">
<!-- Font -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet">
</head>
<body>
<audio id="player" autoplay loop>
<source src="sounds/song.mp3" type="audio/mp3">
</audio>
<div class="container">
<div class="table">
<div id="bg-how-to-play" class="darker-bg">
<div class="shell-how-to-play">
<div class="how-to-play">
<h1 class="game-rules-title "> Game Rules </h1>
<div class="rules-left-column">
<h2 class="rule-title">GOAL</h2>
<p class="rule-description">
Beat the dealer by getting a hand as close to 21 as possible, without going over 21. A
blackjack occurs when you get one ace and one 10 point card, without having split the
deck first.
</p>
<h2 class="rule-title">GAMEPLAY</h2>
<p class="rule-description">The dealer will give 2 cards to themself and 2 cards to you. The
dealer's second card will be played face down. You can choose to either hit (receive
more cards) or stand (move on to the next hand). You can hit as many times as you choose
so long as your deck is under 21.
</p>
<h2 class="rule-title">CARD VALUES</h2>
<p class="rule-description">
Queens, Kings, and Jacks are worth 10, pip cards are worth their face value, but Aces
can be worth either 11 or 1. In this game, Aces have a default value is 11 unless you go
over 21 on your hand.
</p>
</div>
<div class="rules-right-column">
<h2 class=rule-title>BETTING</h2>
<p class="rule-description">
Bets must be placed prior to playing. After receiving your first 2 cards, you can choose
to double down (double your original bet). After your next move, you can no longer
choose to double down.
</p>
<h2 class=rule-title>PAYOUT</h2>
<p class="rule-description">
Payout is 1:1 unless you get a blackjack. For a blackjack, payout is 3:2.
</p>
</div>
</div>
</div>
</div>
<div class="dealer-area">
<div class="dealer-name">
<h1 id="dealer-name">Dealer - <span id="dealer-name-span"> </span></h1>
</div>
<div class="shell-deck-and-cards">
<div class="deck">
<img src="assets/cards/back.svg">
</div>
<div id="deck-copy" class="deck deck-copy">
</div>
<div id="dealer-cards" class="dealer-cards">
</div>
</div>
</div>
<div class="player-area">
<div class="player-name">
<h1 id="player-name">Player - <span id="player-name-span"> </span></h1>
</div>
<div class="shell-deck-and-cards">
<div class="deck">
<img src="assets/cards/back.svg">
</div>
<div id="player-cards" class="player-cards">
</div>
</div>
</div>
<div id="how-to-play" class="btn-how-to-play">
<p>How to play</p>
<span>
<img src="assets/icons/htp-icon.png" alt="">
</span>
</div>
</div>
<div id="start-screen" class="start-screen-container">
<div class="start-screen">
<h1 id="welcome-message-title"> Welcome to the Blackjack game </h1>
<p class="start-screen-description">Start playing by selecting your bet below. To view the rules at any time, click the icon in the top right.</p>
<div class="bets">
<div id="bet-25" class="next-bet">
<img src="assets/icons/25.png" alt="">
<p>25</p>
</div>
<div id="bet-50" class="next-bet">
<img src="assets/icons/50.png" alt="">
<p>50</p>
</div>
<div id="bet-75" class="next-bet">
<img src="assets/icons/75.png" alt="">
<p>75</p>
</div>
<div id="bet-100" class="next-bet">
<img src="assets/icons/100.png" alt="">
<p>100</p>
</div>
</div>
<button id="start-game" class="">
Play
</button>
</div>
</div>
<!-- HIDED CONTENT-->
<!-- RESULT SCREEN -->
<div id="result-screen" class="result-screen">
<div class="result-content">
<h1 id="result-title" class="result-title"></h1>
<p class="result-phrase"> Lorem ipsum dolor sit amet </p>
<div class="result-grid">
<div class="result-items">
<div class="result-label">
<h1 class="name">Dealer</h1>
<div class="result-square">
<span id="dealer-final-score">0</span>
</div>
</div>
<div class="result-label">
<h1 class="name">Player</h1>
<div class="result-square">
<span id="player-final-score">0</span>
</div>
</div>
</div>
<div class="bets">
<div id="bet-25-alt" class="next-bet">
<img src="assets/icons/25.png" alt="">
<p>25</p>
</div>
<div id="bet-50-alt" class="next-bet">
<img src="assets/icons/50.png" alt="">
<p>50</p>
</div>
<div id="bet-75-alt"class="next-bet">
<img src="assets/icons/75.png" alt="">
<p>75</p>
</div>
<div id="bet-100-alt"class="next-bet">
<img src="assets/icons/100.png" alt="">
<p>100</p>
</div>
</div>
</div>
<button id="play-again-btn" class="result-play-again">
Play Again
</button>
</div>
</div>
<!-- MENU SIDEBAR -->
<div id="menu" class="menu">
<!-- NAV -->
<div id="nav" class="nav">
<div id="setting-btn" class="menu-settings">
<img src="assets/icons/settings-icon.png">
</div>
</div>
<!--Player Area-->
<div id="player-info" class="player-info">
<div id="user-img" class="profile-picture">
</div>
<p id="username-element" class="player-name"></p>
<p class="player-statistics"> WINS: <span id="total-wins" class="total-text">0</span> | LOSSES: <span
id="total-losses" class="total-text">0</span> | DRAWS: <span id="total-draws"
class="total-text">0</span></p>
<p id="user-description-element" class="player-description">
""
</p>
</div>
<!-- DATA INFO -->
<div id="data" class="data">
<div class="data-area" id="yourChips">
<p class="name">Your Chips</p>
<span class="icon">
<img src="assets/icons/poker-chip.png" alt="">
</span>
<p id="yourChips-value" class="value"></p>
</div>
<div class="data-area" id="currentBet">
<p class="name">Current Bet</p>
<!--<button id="minus-btn" class="minus-btn">-</button>
<button id="plus-btn" class="plus-btn"> + </button>-->
<span class="icon">
<img src="assets/icons/current-bet.png" alt="">
</span>
<p id="currentBet-value" class="value"></p>
</div>
<div class="data-area" id="record">
<p class="name">Your Record</p>
<span class="icon">
<img src="assets/icons/record.png" alt="">
</span>
<p id="record-value" class="value"></p>
</div>
<div class="data-area" id="winStreak">
<p class="name">Best Win Streak</p>
<span class="icon">
<img src="assets/icons/win-streak-max.png" alt="">
</span>
<p id="winStreak-value" class="value"></p>
</div>
</div>
<div id="buttons" class="buttons">
<div class="up-buttons">
<button id="hit-btn" class="hit-btn">
Hit
</button>
<button id="hold-btn" class="hold-btn">
Hold
</button>
<button id="double" class="double-btn">
Double
</button>
</div>
<div class="down-buttons">
<button id="reset-game" class="reset-game-btn">
Reset Game
</button>
<button id="reset-data" class="reset-data-btn">
Reset Data
</button>
</div>
</div>
</div>
<!-- EDIT INFO SIDEBAR -->
<div id="edit-info" class="edit-info">
<div id="nav" class="nav">
<div id="close-btn" class="menu-settings">
<img src="assets/icons/close.png">
</div>
</div>
<form id="register">
<label> Your name </label><input id="username-input" placeholder="Type your name here...">
<label> Description, Goal or Lucky Said </label><input id="user-description-input" placeholder="Type anything here..." maxlength="66">
</form>
<button id="user-info" type="submit" form="form1" value="Submit">Submit</button>
<button id="mute-btn" class="mute-sound-btn"> Mute sound </button>
</div>
</div>
</body>
<script src="scripts.js" type="module"></script>
<script src="game.js" type="module"></script>
<script src="deck.js" type="module"></script>
</html>