-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
100 lines (90 loc) · 4.37 KB
/
index.html
File metadata and controls
100 lines (90 loc) · 4.37 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=2.0" />
<title>Judgment Game</title>
<link href='style.css' rel='stylesheet'>
<link rel="icon" href="gamepad-svgrepo-com.svg" type="image/x-icon">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/5/w3.css">
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
</head>
<body>
<div class="container mx-auto px-4">
<div id="initialPage" class=" flex flex-col items-center gap-6">
<h1>The Game Of Judgment</h1><img src="gamepad-svgrepo-com.svg" alt="gamepad">
<p>
Welcome to the game of Judgment! In this game, each player will be given a hand of cards. The goal is to
determine the
total value of the cards in each hand. The player with the highest total value wins the round.
</p>
<p>
<div class="w3-container">
<label class="label" for="numPlayers">
<span class="label-text text-center">Number of Players:</span>
</label>
<input class="w3-input w3-border w3-round" type="number" id="numPlayers" min="1" value="4">
</div>
<button class="w3-button w3-ripple w3-round w3-blue " id="startGame">Start Game</button>
</div>
<div id="gameArea" style="display: none; text-align: center;">
<header>
<h1>Game of Judgment</h1>
<h2 id="roundNumber">Round:</h2>
<span id="trumpCardDisplay" style=" display: flex;
align-items: flex-start; justify-content: space-around;">Trump Cards: <img id="trumpCardImage" src="" alt="Trump Card"
style="width: 48px; height: 48px; "></span>
</header>
<div class="columns" id="playerContainers">
</div>
<div class="controls">
<button class="w3-button w3-ripple w3-round w3-border w3-border-blue" id="calculateButton"
onclick="playerSelectorModal.showModal()">Next Round</button>
<button class="w3-button w3-ripple w3-round w3-border w3-border-black" id="endGameButton"
onclick="displayFinalScores()">End Game</button>
</div>
<div>
<table id="unifiedScoreTable">
<thead>
<tr>
<th>Round</th>
<th id="playerNamesHeader" style="display: none;"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<dialog id="playerSelectorModal">
<h3 class="w3-text-blue">Select Successful Players</h3>
<form id="playerSelectorForm" class="w3-container w3-padding">
</form>
<div class="w3-container w3-padding-16 w3-right-align">
<button class="w3-button w3-ripple w3-round w3-blue" id="confirmSelection">Confirm</button>
<button class="w3-button w3-ripple w3-round w3-border w3-border-black"
onclick="playerSelectorModal.close()">Cancel</button>
</div>
</dialog>
</div>
<div id="finalScores"></div>
<template id="playerTemplate">
<div class="playerBox w3-round w3-border w3-border-blue w3-hover w3-hover-pale-blue">
<div class="card bg-base-100 text-neutral-content w-96 shadow-xl">
<div class="card-body">
<label>
<input class="w3-input w3-border w3-round py-3 w-full max-w-xs playerName" type="text"
placeholder="Player Name">
</label>
<div class="inputs">
<button class="w3-button w3-ripple w3-round-xlarge addButton">+</button>
<span class="handValue">0</span>
<button class="w3-button w3-ripple w3-round-xlarge subtractButton">-</button>
</div>
</div>
</div>
</div>
</template>
<script src="index.js"></script>
</div>
</body>
</html>