-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (48 loc) · 1.89 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="index.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;700&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/js-confetti@latest/dist/js-confetti.browser.js"></script>
<title>Dice Dash</title>
</head>
<body>
<h1 class="title-style">🎲 DICE DASH 🎲</h1>
<div class="rulesBox">
<h1>RULES</h1>
<h3>-The first player to reach 20 points wins.</h3>
<h3>-If a player's dice roll matches the dice of the other player, their total score will reset to zero.</h3>
</div>
<div class="container">
<h1 id="message">Player 1 Turn</h1>
<div class="players">
<div id="player1">
<h1>Score:
<span id="player1Scoreboard">0</span>
</h1>
<div id="player1Dice" class="dice active">-</div>
</div>
<div id="player2">
<h1>Score:
<span id="player2Scoreboard">0</span>
</h1>
<div id="player2Dice" class="dice">-</div>
</div>
</div>
<button id="rollBtn">Roll Dice 🎲</button>
<button id="resetBtn">Reset Game 🔁</button>
</div>
<script src="index.js"></script>
<script>
const jsConfetti = new JSConfetti()
function confettiFUN() {
jsConfetti.addConfetti({
confettiRadius: 5,
confettiNumber: 500,
})
}
</script>
</body>
</html>