-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
140 lines (127 loc) · 2.42 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Point Park Blackjack</title>
<link rel="icon" href="images/favicon.png" type="image/x-icon">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="jquery.js"></script>
<script src="blackjack.js"></script>
<style>
body {
background-color: green;
}
#header {
padding: 20px;
font-size: 20px;
text-align: center;
color: white;
}
#dealer {
clear:both;
border: 1px solid gray;
height: 250px;
width: 600px;
display: block;
margin-left: auto;
margin-right: auto;
display: block;
margin-left: auto;
margin-right: auto;
}
#player {
clear:both;
border: 1px solid gray;
height: 250px;
width: 600px;
display: block;
margin-left: auto;
margin-right: auto;
display: block;
}
.button {
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
}
#hit {
position: absolute;
top: 80%;
left: 45%;
}
#stand {
position: absolute;
top: 80%;
left: 49.5%;
}
#bet {
position: absolute;
top: 80%;
left: 55%;
}
#double {
position: absolute;
top: 85%;
left: 45%;
}
#new {
position: absolute;
top: 85%;
left: 52%;
}
.current_hand{
float:left;
}
/*
#hit, #stand, #btnRestart{
display:none;
float:left;
}
*/
</style>
<script>
$(function() {
$("#new").click(function() {
// Controller (Blackjack), fires when you click on newgame
// intructs the model to start new game; clears all arrays, 2 new cards dealt
blackjack.newGame();
});
// intructs the model to draw 2 new cards for new game
$("#bet").click( function() {
blackjack.deal();
// $(this).toggle();
// $("#Hit").toggle();
});
$("#hit").click( function() {
blackjack.hit();
// $(this).toggle();
// $("#Hit").toggle();
});
});
</script>
</head>
<body>
<div id="header">
<h1>Blackjack</h1>
</div>
<!--
<div id="dealer">
</div>
-->
<h3 id="pTotal"></h3>
<h3 id="pResult"></h3>
<br>
<div id="player">
</div>
<br>
<div>
<button id="hit" type="button">Hit!</button>
<button id="stand" type="button">Stand!</button>
<button id="bet" type="button">Bet!</button>
<button id="double" type="button">Double Down!</button>
<button id="new" type="button">New Game!</button>
</div>
</body>
</html>