-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
175 lines (168 loc) · 6.05 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<title>Advanced Dice Game</title>
<link
rel="stylesheet"
href="styles.css"
/>
</head>
<body>
<header>
<h1>Advanced Dice Game</h1>
<button
class="btn"
id="rules-btn"
type="button"
>
Show rules
</button>
<div class="rules-container">
<h2>Rules</h2>
<ul>
<li>There are total of six rounds</li>
<li>You can only roll the dice three times per round</li>
<li>To start the game, roll the dice</li>
<li>
Then, choose from one of the selected scores or roll the
dice again
</li>
<li>
If you choose a selected score, then you will move to
the next round
</li>
<li>
If you decline to choose a selected score, then you can
roll the dice again two more times
</li>
</ul>
<h2 class="points">Points</h2>
<ul>
<li>Three of a kind: Sum of all five dice</li>
<li>Four of a kind: Sum of all five dice</li>
<li>Full house: Three of a kind and a pair - 25 points</li>
<li>
Small straight: Four of the dice have consecutive values
- 30 points
</li>
<li>
Large straight: All five dice have consecutive values -
40 points
</li>
</ul>
</div>
</header>
<main>
<form id="game">
<div id="dice">
<div class="die"></div>
<div class="die"></div>
<div class="die"></div>
<div class="die"></div>
<div class="die"></div>
</div>
<p class="rounds-text">
<strong>Rolls:</strong>
<span id="current-round-rolls">0</span> |
<strong>Round:</strong> <span id="current-round">1</span>
</p>
<div id="score-options">
<div>
<input
type="radio"
name="score-options"
id="three-of-a-kind"
value="three-of-a-kind"
disabled
/>
<label for="three-of-a-kind"
>Three of a kind<span></span
></label>
</div>
<div>
<input
type="radio"
name="score-options"
id="four-of-a-kind"
value="four-of-a-kind"
disabled
/>
<label for="four-of-a-kind"
>Four of a kind<span></span
></label>
</div>
<div>
<input
type="radio"
name="score-options"
id="full-house"
value="full-house"
disabled
/>
<label for="full-house">Full house<span></span></label>
</div>
<div>
<input
type="radio"
name="score-options"
id="small-straight"
value="small-straight"
disabled
/>
<label for="small-straight"
>Small straight<span></span
></label>
</div>
<div>
<input
type="radio"
name="score-options"
id="large-straight"
value="large-straight"
disabled
/>
<label for="large-straight"
>Large straight<span></span
></label>
</div>
<div>
<input
type="radio"
name="score-options"
id="none"
value="none"
disabled
/>
<label for="none">None of the above<span></span></label>
</div>
</div>
<button
class="btn"
id="keep-score-btn"
type="button"
>
Keep the above selected score
</button>
<button
class="btn"
id="roll-dice-btn"
type="button"
>
Roll the dice
</button>
</form>
<div id="scores">
<h3>
Score history (Total score: <span id="total-score">0</span>)
</h3>
<ol id="score-history"></ol>
</div>
</main>
<script src="./script.js"></script>
</body>
</html>