-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
74 lines (71 loc) · 3.58 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script defer src="Task02_Function.js"></script>
<link rel="stylesheet" href="Task02_Style.css">
<title>Shut the Box</title>
</head>
<body>
<div class="card text-center">
<div id="rules" class="text-center card-header">
<h1>Shut the Box</h1>
</div>
<h2>The Rules</h2>
<ol type="i" class="list-group list-group-flush list-group-numbered text-start">
<li class="list-group-item">Fach turn, you roll the dice (or die) and select 1 or more boxes which sum to
value
of your roll.</li>
<li class="list-group-item">You will not be allowed to pick the boxes which you choose on subsequent turns.
</li>
<li class="list-group-item">When the sum of boxes which are left is less than or equal to 6, you'll only
roll a
single dice.</li>
<li class="list-group-item">When you cannot make a move or you give up, the sum of the boxes which are left
gives your score.</li>
<li class="list-group-item">Lower scores are better and a score of 0 is called "Shutting the Box".</li>
</ol>
<div id="roll" class="text-center">
<h2>Dice Roll</h2>
<div id="dice-box">
<button class="btn btn-outline-primary" onclick="rollDice()" id="rollBtn">Dice Roll</button>
<p id="result"></p>
</div>
</div>
<div id="shutter-box" class="text-center">
<h2>Box Selection</h2>
<form>
<div id="box" class="text-center form-check form-check-inline">
<label for="box1">1 -></label>
<input type="checkbox" value="1" id="box1" class="shut">
<label for="box2">2 -></label>
<input type="checkbox" value="2" id="box2" class="shut">
<label for="box3">3 -></label>
<input type="checkbox" value="3" id="box3" class="shut">
<label for="box4">4 -></label>
<input type="checkbox" value="4" id="box4" class="shut">
<label for="box5">5 -></label>
<input type="checkbox" value="5" id="box5" class="shut">
<label for="box6">6 -></label>
<input type="checkbox" value="6" id="box6" class="shut">
<label for="box7">7 -></label>
<input type="checkbox" value="7" id="box7" class="shut">
<label for="box8">8 -></label>
<input type="checkbox" value="8" id="box8" class="shut">
<label for="box9">9 -></label>
<input type="checkbox" value="9" id="box9" class="shut">
</div>
</form>
<div id="buttons" class="text-center card-footer">
<button class="btn btn-outline-success" id="submit" onclick="Check()">Submit Box Selection</button>
<button class="btn btn-outline-danger" id="endGame" onclick="endGame()">I gave up I can't make the valid
move</button>
</div>
</div>
</div>
</body>
</html>