-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
558 lines (504 loc) · 20 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
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="description" content="Free multiplayer Blackjack casino game. Play Blackjack online with your friends!">
<meta name="keywords" content="blackjack, io, casino, online, multiplayer, friends, game, card game, 21">
<meta property="og:title" content="PLAY BLACKJACK WITH YOUR FRIENDS">
<meta property="og:type" content="website">
<meta property="og:url" content="http://blackjack21.io">
<meta property="og:image" itemprop="image" content="https://i.ibb.co/fHkyMJS/blackjack21-showcase.jpg">
<title>Blackjack21.io</title>
<link rel="stylesheet" href="/css/dist/style.css">
<link rel="stylesheet" href="/css/style.scss">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&family=Play&family=Roboto&family=Rubik&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Bungee+Inline&family=Luckiest+Guy&family=Ultra&display=swap" rel="stylesheet">
<link rel="icon" href="/imgs/chips/Casino_Chip_Red.svg">
</head>
<body>
<div class="cardImg dealerCardImg hide-element"></div>
<div id="loading-screen" class="hide-element">
<img id="loading-icon" src="/imgs/LoadingIcon.png" alt="Loading...">
</div>
<div id="info-rules">
<div id="how-to-play">
HOW TO PLAY
</div>
<div id="info-rules-overflow">
<div>
<h1 id="h1margin">OBJECT OF THE GAME</h1>
<P>
Each participant attempts to beat the dealer by getting a count as close to 21 as possible, without going above 21.
</P>
</div>
<div>
<h1>CARD VALUES/SCORING</h1>
<p>
Usually it's up to each individual player if an ace is worth 1 or 11. However in this game if a player stands with an ace, it will always count the ace as 11 if your total sum doesn't exceed 21. Face cards are 10 and any other card is its original value.</p>
</div>
<div>
<h1>BETTING</h1>
<p>
Before the dealer begins dealing out cards, each player must place a bet.</p>
</div>
<div>
<h1>THE DEAL</h1>
<p>
The round starts with the dealer giving out 2 cards to each player. He also gives himself one card facing up & one card facing down.</p>
</div>
<div>
<h1>NATURALS</h1>
<p>
If a player gets a count to 21 on the first 2 cards, the player gets Blackjack. Blakjack pays out 3:2 directly to the player and he will wait until next round to play again.</p>
</div>
<div>
<h1>THE PLAY</h1>
<p>
Now its time for the first player to make his move.
The player can Hit, Stand, Or Double Down.
<ul>
<li><strong style="color: green">Hit</strong> = Ask for another card in attempt to get closer to 21.</li>
<li><strong style="color: red">Stand</strong> = Don't ask for any cards, moves on to the next player</li>
<li><strong style="color: goldenrod">Double Down</strong> = Double the bet and ask for another card. (You can only double down once per round & can't draw any more cards after double'd down).</li>
</ul>
</p>
</div>
<div>
<h1>THE DEALER'S PLAY</h1>
<p>
Dealer starts with flipping his card facing down. Dealer will draw until he reaches 17, when dealer's sum is 17 or above, he stops taking cards.
</p>
</div>
<div>
<h1>PAYOUT</h1>
<p>
<ul>
<li>If the player busts, he will lose his bet, even if the dealer also busts.</li>
<li>If player has higher value cards than the dealer, the player wins.</li>
<li>If dealer has higher value cards than the player, the dealer wins.</li>
</ul>
</p>
</div>
</div>
</div>
<div id="main-menu" class="">
<h1 id="blackjack-title">blackjack21<span>.io</span></h1>
<!-- <img id="blackjack-title" src="/imgs/blackjack21io.png" alt="blackjack21.io"> -->
<div id="main-box">
<div id="avatar-box">
<button class="prev" onclick="plusSlides(-1)">
<i class="fas fa-chevron-left"></i>
</button>
<span class="slideAvatars" data-value="user">
<div class="numbertext">1 / 8</div>
<img src="/imgs/avatars/user.svg" alt="avatar">
</span>
<span class="slideAvatars" data-value="mafia" style="display: none;">
<div class="numbertext">2 / 8</div>
<img src="/imgs/avatars/mafia.svg" alt="avatar">
</span>
<span class="slideAvatars" data-value="casino" style="display: none;">
<div class="numbertext">3 / 8</div>
<img src="/imgs/avatars/casino.svg" alt="avatar">
</span>
<span class="slideAvatars" data-value="baby" style="display: none;">
<div class="numbertext">4 / 8</div>
<img src="/imgs/avatars/baby.svg" alt="avatar">
</span>
<span class="slideAvatars" data-value="terrorist" style="display: none;">
<div class="numbertext">5 / 8</div>
<img src="/imgs/avatars/terrorist.svg" alt="avatar">
</span>
<span class="slideAvatars" data-value="detective" style="display: none;">
<div class="numbertext">6 / 8</div>
<img src="/imgs/avatars/detective.svg" alt="avatar">
</span>
<span class="slideAvatars" data-value="work-out" style="display: none;">
<div class="numbertext">7 / 8</div>
<img src="/imgs/avatars/work-out.svg" alt="avatar">
</span>
<span class="slideAvatars" data-value="manager" style="display: none;">
<div class="numbertext">8 / 8</div>
<img src="/imgs/avatars/manager.svg" alt="avatar">
</span>
<button class="next" onclick="plusSlides(1)">
<i class="fas fa-chevron-right"></i>
</button>
</div>
<div>
<input id="nickname" type="text" placeholder="Nickname" maxlength="12">
</div>
<div>
<button id="btnOffline" class="play-btns noclick-nohide"><span><i class="fas fa-user"></i></span>Play Offline</button>
</div>
<div>
<button id="btnCreate" class="play-btns noclick-nohide"><span><i class="fas fa-users"></i></span>Create Room</button>
</div>
<div>
<button id="btnJoin" class="play-btns noclick-nohide hide-element"><span><i class="fas fa-users"></i></span>Join Room</button>
</div>
</div>
<div id="about-box">
<strong>blackjack21.io</strong> is a free multiplayer casino game. It's an online version of the traditional blackjack played at real casinos, with some exceptions.
<ul>
<li>Every game uses 1 standard 52-card pack that shuffles every round.</li>
<li>Current version of the game does not support Splitting Cards & Insurance.</li>
<li>A private room can consist up to 7 players.</li>
</ul>
<button id="about">
About
</button>
</div>
<a id="credits" href="/credits" target="_blank">Credits</a>
</div>
<div id="game-room" class="hide-element">
<div id="dark-overlay"></div>
<div id="table-graphics"></div>
<!-- <img id="table-graphics" src="/imgs/table-graphics3.svg" alt=""> -->
<!-- <div id="leave-box"> -->
<!-- <i class="fas fa-sign-out-alt"></i> -->
<button id="leave-button" onclick="exitRoom()">
<i class="fas fa-sign-out-alt"></i>
EXIT ROOM
</button>
<!-- </div> -->
<button id="leave-table" class="noclick">
<i class="far fa-arrow-alt-circle-left"></i>
LEAVE TABLE
</button>
<div id="invite-link-box">
<div id="invite-label">Hover to see invite link</div>
<input id="invite-link" type="text">
<button>COPY</button>
</div>
<div id="volume-button">
<i class="fas fa-volume-up"></i>
</div>
<div id="bg-color-box">
<div class="bg-colors bg-selected" id="bg-green"></div>
<div class="bg-colors" id="bg-blue"></div>
<div class="bg-colors" id="bg-purple"></div>
<div class="bg-colors" id="bg-red"></div>
<div class="bg-colors" id="bg-brown"></div>
</div>
<div id="player-result-big" class="hide-element">
<div id="player-result-big-answer"></div>
<div id="player-result-sum-box">
<span id="player-result-big-plus-minus"></span>
<span id="player-result-big-sum"></span>
</div>
</div>
<div id="deal-start-label" class="hide-element">
<p>Waiting for bets <span id="seconds">39</span><span>.</span><span id="milliseconds">9</span></p>
<!-- </span><span>.</span><span id="milliseconds"></span> -->
</div>
<div id="join-mid-game-label" class="hide-element">
Game currently ongoing...
</div>
<div id="users-online-box">
<div>
<div id="users-online-label">USERS IN ROOM</div>
<div id="users-online-button"><i class="fas fa-chevron-right"></i></div>
</div>
<ul id="users-online-container">
</ul>
</div>
<div id="dealer">
<h1>DEALER</h1>
<div id="dealerSum">sum here</div>
<div class="dealer-cards">
<div class="visibleCards">
<!-- <img class="dealerCardImg" src="/imgs/Diamond7.svg">
<img class="dealerCardImg" src="/imgs/Diamond7.svg">
<div class="flip-card">
<div class="flip-card-inner">
<div class="flip-card-front">
<img class="dealerCardImg card-front" src="/imgs/Card_back.svg">
</div>
<div class="flip-card-back">
<img class="dealerCardImg card-back" src="/imgs/Diamond7.svg">
</div>
</div>
</div> -->
<!-- <img class="dealerCardImg" src="/imgs/Diamond7.svg"> -->
<!-- <img class="dealerCardImg hiddenCard" src="/imgs/Diamond7.svg"> -->
</div>
<!-- <div class="hiddenCard">
<img src="/imgs/Card_back.svg" alt="">
</div> -->
</div>
</div>
<div class="user-action-container hide-element">
<div id="your-turn-label">MAKE A DECISION</div>
<div class="user-action-box">
<button class="user-action" id="stand"><i class="fas fa-hand-paper"></i></button>
<div class="user-action-text">STAND</div>
</div>
<div class="user-action-box">
<button class="user-action" id="hit"><i class="fas fa-hand-pointer"></i></button>
<div class="user-action-text">HIT</div>
</div>
<div class="user-action-box">
<button class="user-action" id="doubleDown"><i class="fas fa-hand-peace"></i><span>2X</span></button>
<div class="user-action-text">DOUBLE DOWN</div>
</div>
</div>
<div id="players-container">
<span class="players">
<div><button class="ready hide-element">PLACE BET</button></div>
<div class="empty-slot"><i class="fas fa-user-plus"></i></div>
<div class="player-name hide-element">name here<span class="hide-element"><img class="player-avatar" src="" alt="avatar"></span></div>
<div class="player-sum">sum here</div>
<div class="player-coin hide-element">bet here<div class="player-bet hide-element"></div></div>
<div class="player-result hide-element">Win/Lose/Draw</div>
<div class="player-cards">
</div>
</span>
<span class="players">
<div><button class="ready hide-element">PLACE BET</button></div>
<div class="empty-slot"><i class="fas fa-user-plus"></i></div>
<div class="player-name hide-element">name here<span class="hide-element"><img class="player-avatar" src="" alt="avatar"></span></div>
<div class="player-sum">sum here</div>
<div class="player-coin hide-element">bet here<div class="player-bet hide-element"></div></div>
<div class="player-result hide-element">Win/Lose/Draw</div>
<div class="player-cards">
</div>
</span>
<span class="players">
<div><button class="ready hide-element">PLACE BET</button></div>
<div class="empty-slot"><i class="fas fa-user-plus"></i></div>
<div class="player-name hide-element">name here<span class="hide-element"><img class="player-avatar" src="" alt="avatar"></span></div>
<div class="player-sum">sum here</div>
<div class="player-coin hide-element">bet here<div class="player-bet hide-element"></div></div>
<div class="player-result hide-element">Win/Lose/Draw</div>
<div class="player-cards">
</div>
</span>
<span class="players">
<div><button class="ready hide-element">PLACE BET</button></div>
<div class="empty-slot"><i class="fas fa-user-plus"></i></div>
<div class="player-name hide-element">name here<span class="hide-element"><img class="player-avatar" src="" alt="avatar"></span></div>
<div class="player-sum">sum here</div>
<div class="player-coin hide-element">bet here<div class="player-bet hide-element"></div></div>
<div class="player-result hide-element">Win/Lose/Draw</div>
<div class="player-cards">
</div>
</span>
<span class="players">
<div><button class="ready hide-element">PLACE BET</button></div>
<div class="empty-slot"><i class="fas fa-user-plus"></i></div>
<div class="player-name hide-element">name here<span class="hide-element"><img class="player-avatar" src="" alt="avatar"></span></div>
<div class="player-sum">sum here</div>
<div class="player-coin hide-element">bet here<div class="player-bet hide-element"></div></div>
<div class="player-result hide-element">Win/Lose/Draw</div>
<div class="player-cards">
</div>
</span>
<span class="players">
<div><button class="ready hide-element">PLACE BET</button></div>
<div class="empty-slot"><i class="fas fa-user-plus"></i></div>
<div class="player-name hide-element">name here<span class="hide-element"><img class="player-avatar" src="" alt="avatar"></span></div>
<div class="player-sum">sum here</div>
<div class="player-coin hide-element">bet here<div class="player-bet hide-element"></div></div>
<div class="player-result hide-element">Win/Lose/Draw</div>
<div class="player-cards">
</div>
</span>
<span class="players">
<div><button class="ready hide-element">PLACE BET</button></div>
<div class="empty-slot"><i class="fas fa-user-plus"></i></div>
<div class="player-name hide-element">name here<span class="hide-element"><img class="player-avatar" src="" alt="avatar"></span></div>
<div class="player-sum">sum here</div>
<div class="player-coin hide-element">bet here<div class="player-bet hide-element"></div></div>
<div class="player-result hide-element">Win/Lose/Draw</div>
<div class="player-cards">
</div>
</span>
</div>
<div id="players-timer-container">
<svg class="players-timer">
<circle class="" cx="48.5" cy="48.5" r="45" stroke-width="4" fill="transparent"/>
</svg>
<svg class="players-timer">
<circle class="" cx="58.5" cy="58.5" r="45" stroke-width="4" fill="transparent"/>
</svg>
<svg class="players-timer">
<circle class="" cx="58.5" cy="58.5" r="45" stroke-width="4" fill="transparent"/>
</svg>
<svg class="players-timer">
<circle class="" cx="58.5" cy="58.5" r="45" stroke-width="4" fill="transparent"/>
</svg>
<svg class="players-timer">
<circle class="" cx="58.5" cy="50" r="45" stroke-width="4" fill="transparent"/>
</svg>
<svg class="players-timer">
<circle class="" cx="58.5" cy="58.5" r="45" stroke-width="4" fill="transparent"/>
</svg>
<svg class="players-timer">
<circle class="" cx="50" cy="50" r="48" stroke-width="4" fill="transparent"/>
</svg>
</div>
<div id="bets-container" class="noclick">
<span>
<button class="max-clear update-balance-bet">CLEAR</button>
</span>
<span>
<button class="betButtons update-balance-bet" id="chip10" value="10">10</button>
<!-- <img src="/imgs/chips/Casino_Chip_White2.svg" alt=""> -->
</span>
<span>
<button class="betButtons update-balance-bet" id="chip50" value="50">50</button>
</span>
<span>
<button class="betButtons update-balance-bet" id="chip100" value="100">100</button>
</span>
<span>
<button class="betButtons update-balance-bet" id="chip500" value="500">500</button>
</span>
<span>
<button class="betButtons update-balance-bet" id="chip1k" value="1000">1K</button>
</span>
<span>
<button class="betButtons update-balance-bet" id="chip5k" value="5000">5K</button>
</span>
<span>
<button class="betButtons update-balance-bet" id="chip10k" value="10000">10K</button>
</span>
<span>
<button class="betButtons update-balance-bet" id="chip50k" value="50000">50K</button>
</span>
<span>
<button class="betButtons update-balance-bet" id="chip100k" value="100000">100K</button>
</span>
<span>
<button class="max-clear update-balance-bet">MAX</button>
</span>
</div>
<!-- <div id="dealer">
<h2>Dealer</h2>
<div id="dealerSum">sum here</div>
<div class="dealer-cards">
<div class="visibleCards">
</div>
</div>
</div> -->
<div id="balance-bet-box">
<div class="balance-bet">
Balance
<div id="balance"></div>
</div>
<div class="balance-bet">
Total Bet
<div id="total-bet"></div>
</div>
</div>
</div>
<!-- PRE-LOAD DECK IMAGES -->
<div class="hidden">
<script>
var images = new Array()
function preload() {
for (i = 0; i < preload.arguments.length; i++) {
images[i] = new Image()
images[i].src = preload.arguments[i]
}
}
preload(
"/imgs/Heart2.svg",
"/imgs/Heart3.svg",
"/imgs/Heart4.svg",
"/imgs/Heart5.svg",
"/imgs/Heart6.svg",
"/imgs/Heart7.svg",
"/imgs/Heart8.svg",
"/imgs/Heart9.svg",
"/imgs/Heart10.svg",
"/imgs/HeartJ.svg",
"/imgs/HeartQ.svg",
"/imgs/HeartK.svg",
"/imgs/HeartA.svg",
"/imgs/Diamond2.svg",
"/imgs/Diamond3.svg",
"/imgs/Diamond4.svg",
"/imgs/Diamond5.svg",
"/imgs/Diamond6.svg",
"/imgs/Diamond7.svg",
"/imgs/Diamond8.svg",
"/imgs/Diamond9.svg",
"/imgs/Diamond10.svg",
"/imgs/DiamondJ.svg",
"/imgs/DiamondQ.svg",
"/imgs/DiamondK.svg",
"/imgs/DiamondA.svg",
"/imgs/Spade2.svg",
"/imgs/Spade3.svg",
"/imgs/Spade4.svg",
"/imgs/Spade5.svg",
"/imgs/Spade6.svg",
"/imgs/Spade7.svg",
"/imgs/Spade8.svg",
"/imgs/Spade9.svg",
"/imgs/Spade10.svg",
"/imgs/SpadeJ.svg",
"/imgs/SpadeQ.svg",
"/imgs/SpadeK.svg",
"/imgs/SpadeA.svg",
"/imgs/Club2.svg",
"/imgs/Club3.svg",
"/imgs/Club4.svg",
"/imgs/Club5.svg",
"/imgs/Club6.svg",
"/imgs/Club7.svg",
"/imgs/Club8.svg",
"/imgs/Club9.svg",
"/imgs/Club10.svg",
"/imgs/ClubJ.svg",
"/imgs/ClubQ.svg",
"/imgs/ClubK.svg",
"/imgs/ClubA.svg"
)
</script>
</div>
<script type="text/javascript" src="js/lib/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="/js/app.js"></script>
<script type="text/javascript" src="/js/client.js"></script>
<!-- Sounds -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.0/howler.min.js"></script>
<script>
let dealingSound = new Howl({
src: ['sounds/dealing_card_fix3.mp3']
});
let chipHover = new Howl({
src: ['sounds/chip_hover_fix.mp3']
});
let chipPlace = new Howl({
src: ['sounds/chip_place.mp3']
});
let actionClick = new Howl({
src: ['sounds/actionClick.mp3']
});
let defaultClick = new Howl({
src: ['sounds/click_default.mp3']
});
let clickFiller = new Howl({
src: ['sounds/click_filler.mp3']
});
let timerRunningOut = new Howl({
src: ['sounds/timer_running_out.mp3']
});
// let youWin = new Howl({
// src: ['sounds/you_win.mp3']
// });
// let youLose = new Howl({
// src: ['sounds/you_lose.mp3']
// });
$(".betButtons").hover(function() {
chipHover.play();
}, function () {
// play nothing when mouse leaves chip
});
</script>
</body>
</html>