-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
87 lines (83 loc) · 4.55 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>The Pig Game</title>
<link rel="stylesheet" href="css/main.css">
<link href="https://fonts.googleapis.com/css?family=Raleway&display=swap" rel="stylesheet">
<link href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
</head>
<body>
<!-- box section -->
<div class="wrapper">
<!-- for logo and game name -->
<header>
<h1>The Pig Head Game</h1>
</header>
<!-- game area -->
<main>
<section class="player-area" id="player-area-1"></section>
<section class="player-area" id="player-area-2"></section>
<div id="new-game-button"><button class="new-game-button"><i class="ion-ios-plus-outline"></i>New
game</button></div>
<div class="player-name" id="player-name-1">Player 1</div>
<div class="player-name" id="player-name-2">Player 2</div>
<div class="dot" id="player-dot-1"></div>
<div class="dot" id="player-dot-2"></div>
<div class="current-scoreboard-title" id="current-scoreboard-title-1">Current Score</div>
<div class="current-scoreboard" id="current-scoreboard-1">0</div>
<div class="current-scoreboard" id="current-scoreboard-2">0</div>
<img id="dice" src="images/dice-0.png" alt="rolling dice">
<div class="current-scoreboard-title" id="current-scoreboard-title-2">Current Score</div>
<button id="btn-roll-1" class="btn-player-1"><i class="ion-ios-loop"></i>Roll dice</button>
<button id="btn-hold-1" class="btn-player-1"><i class="ion-ios-download-outline"></i>Hold</button>
<button id="btn-roll-2" class="btn-player-2"><i class="ion-ios-loop"></i>Roll dice</button>
<button id="btn-hold-2" class="btn-player-2"><i class="ion-ios-download-outline"></i>Hold</button>
<div class="scoreboard-title" id="scoreboard-title-player-1">Score</div>
<div class="scoreboard-title" id="scoreboard-title-player-2">Score</div>
<div class="scoreboard" id="scoreboard-player-1">0</div>
<div class="scoreboard" id="scoreboard-player-2">0</div>
</main>
<footer>
<button id="btn-instruction">Instructions</button>
<p>made by <a href="https://github.com/Yoda-Soda">Jan Claasen</a></p>
<div id="overlay">
<div></div>
<img src="images/winner pig.png" alt="a pig that's winning">
<h1 id="winner">The winner is wrong PLAYER 1!</h1>
<div></div>
</div>
<div id="inst">
<h1>Instructions</h1>
<p>Each turn, a player repeatedly rolls a dice until either a 1 is rolled or the player decides to
"hold":
</p>
<ul>
<li>If the player rolls a 1, they score nothing and it becomes the next player's turn.</li>
<li>If the player rolls any other number, it is added to their turn total and the player's turn
continues.
</li>
<li>If a player chooses to "hold", their turn total is added to their score, and it becomes the
next player's turn.
</li>
<li>The first player to score 100 or more points wins the game.
</li>
</ul>
<p> For example, the first player, Donald, begins a turn with a roll of 5. Donald could hold and score 5
points, but chooses to roll again. Donald rolls a 2, and could hold with a turn total of 7 points,
but chooses to roll again. Donald rolls a 1, and must end his turn without scoring. The next player,
Alexis, rolls the sequence 4-5-3-5-5, after which she chooses to hold, and adds her turn total of 22
points to her score.
</p>
</div>
</footer>
</div>
<script src="script/main.js"></script>
</body>
</html>