-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
164 lines (164 loc) · 10.4 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
<!DOCTYPE html>
<!--[if lte IE 6]><html class="preIE7 preIE8 preIE9"><![endif]-->
<!--[if IE 7]><html class="preIE8 preIE9"><![endif]-->
<!--[if IE 8]><html class="preIE9"><![endif]-->
<!--[if gte IE 9]><!--><!--<![endif]-->
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1 maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="
sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicons/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="images/favicons/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#2d89ef">
<meta name="theme-color" content="#ffffff">
<title>Blackjack Strategy</title>
</head>
<body>
<header>
<nav class="navbar navbar-light bg-light">
<!-- Icon made from "http://www.onlinewebfonts.com/icon" and is licensed by CC BY 3.0 -->
<div class="justify-content-left">
<a class="navbar-brand" href="index.html"><img class="blackjack-logo" src="images/blackjack-logo.png"></a>
</div>
<div class="btn-group btn-group-sm justify-content-center" role="group" aria-label="game-modes">
<button type="button" class="btn btn-outline-secondary game-mode-button" id="all-cards" value="all-cards">All cards</button>
<button type="button" class="btn btn-outline-secondary game-mode-button" id="aces-only" value="aces-only">Aces only</button>
<button type="button" class="btn btn-outline-secondary game-mode-button" id="pairs-only" value="pairs-only">Pairs only</button>
</div>
<div class="justify-content-end">
<a tabindex="0" class="btn btn-light" role="button" data-toggle="popover" data-trigger="focus" data-html="true" data-content="Improve your odds of winning by reducing the House edge to ~0.05% using Blackjack basic strategy.<br><br>Based on your cards and the dealer's up-card, learn when it's best to Hit, Split, Double, or Stand.<br><br>Don't forget to check your loss history, then focus your training on the type of hands needing the most improvement.<br><br>This app's recommendations are based on a 4-8 card deck where the dealer stands on Soft 17." title="Blackjack Strategy"><img class="info-icon" src="images/info-button.png"></a>
</div>
</nav>
</header>
<main>
<div class="container text-center">
<article>
<div class="row scoreboard">
<div class="col-12 text-center">
<p id="scorecard-label">Score: </p>
<p id="scorecard-wins"></p>
<p>-</p>
<p id="scorecard-losses"></p>
<p id="scorecard-percentage"></p>
<p id="scorecard-reset">Reset</button>
</div>
</div>
<div class="row dealer-area">
<div class="col-12">
<div id="dealer-card1"></div>
<div id="dealer-card2"></div>
</div>
</div>
<div class="row user-notification invisible">
<div class="col-12">
<div id="notify-user">
<h4 id="result-text"></h4>
</div>
</div>
</div>
<div class="row player-area">
<div class="col-12">
<div id="player-cards"></div>
</div>
</div>
</article>
<article>
<div class="row action-panel no-gutters">
<div class="col-sm-4 col-2 text-right" id="more-info-buttons">
<div class="row no-gutters">
<div class="col-sm-2 offset-sm-8 col-12">
<button type="button" class="btn btn-light btn-modal-buttons" data-toggle="modal" data-target="#lossHistoryModal" role="button"><img class="chart-image" src="images/chart-line.svg"></button>
<!-- Modal -->
<div class="modal fade" id="lossHistoryModal" tabindex="-1" role="dialog" aria-labelledby="lossHistoryModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content text-center">
<div class="modal-header">
<h5 class="modal-title" id="lossHistoryModalLabel">Loss History</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<table class="table-light table-bordered table-responsive move-history-modal">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Hand Type</th>
<th scope="col">Dealer</th>
<th scope="col">Your Hand</th>
<th scope="col">Your Move</th>
<th scope="col">Correct Move</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-2 col-12">
<button type="button" class="btn btn-light btn-modal-buttons" data-toggle="modal" data-target="#referenceCardModal" role="button"><img class="reference-card-image" src="images/reference-card.svg"></button>
<!-- Modal -->
<div class="modal fade" id="referenceCardModal" tabindex="-1" role="dialog" aria-labelledby="referenceCardModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content text-center">
<div class="modal-header">
<h5 class="modal-title" id="referenceCardModalLabel">Blackjack Basic Strategy</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body strategy-reference-card-body text-center">
<img id="strategy-reference-card" src="images/reference-card.png">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-4 col-8 justify-content-center" id="player-actions">
<div class="row no-gutters">
<div class="col-sm-6 col-12 left-hand-side">
<button type="button" class="btn btn-secondary btn-player-action left-hand-side" role="button" value="Hit">HIT</button>
<button type="button" class="btn btn-secondary btn-player-action" role="button" value="Stand">STAND</button>
</div>
<div class="col-sm-6 col-12">
<button type="button" class="btn btn-secondary btn-player-action" role="button" value="Double">DOUBLE</button>
<button type="button" class="btn btn-secondary btn-player-action" role="button" value="Split">SPLIT</button>
</div>
</div>
</div>
<div class="col-sm-4 col-2" id="new-deal">
<div class="row no-gutters">
<button type="button" class="btn btn-primary" id="new-hand-button" value="new-hand">DEAL</button>
</div>
</div>
</div> <!-- end of row -->
</article>
</div>
</main>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="data.js"></script>
<script src="blackjack.js"></script>
</body>
</html>