-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathblackjack.html
40 lines (33 loc) · 1.31 KB
/
blackjack.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Blackjack</title>
<meta name="description" content="Blackjack">
<meta name="viewport" content="width=device-width">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="blackjack-0.0.1.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
// Set the names for the dealer and player
var player = "Player";
var dealer = "Dealer";
var options = {
numberOfDecks: 1
};
$("#deal").click(function() {
var game = new Blackjack.Game(player, dealer, options);
game.deal();
var shoe = game.getShoe();
var dealerCards = game.getDealer().getCards();
var playerCards = game.getPlayer().getCards();
var standStats = Blackjack.Probability.stand(shoe, dealerCards, playerCards, 3);
var hitStats = Blackjack.Probability.hit(shoe, dealerCards, playerCards, hitMaxPullCount);
var doubleStats = Blackjack.Probability.double(shoe, dealerCards, playerCards, 3);
});
});
</script>
</body>
</html>