-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
96 lines (89 loc) · 3.95 KB
/
index.html
File metadata and controls
96 lines (89 loc) · 3.95 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rock Paper Scissors</title>
<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=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.6.0/dist/confetti.browser.min.js"></script>
</head>
<body>
<div class="app-container">
<header>
<h1>Rock <span class="highlight">Paper</span> Scissors</h1>
<p class="subtitle">Choose your move and battle the AI</p>
</header>
<div class="settings-bar">
<div class="setting-group">
<label for="series-mode">Mode:</label>
<select id="series-mode" class="glass-select" onchange="resetGame()">
<option value="infinity">Endless Play</option>
<option value="3">Best of 3</option>
<option value="5">Best of 5</option>
</select>
</div>
<div class="setting-group">
<label for="ai-difficulty">Difficulty:</label>
<select id="ai-difficulty" class="glass-select" onchange="resetGame()">
<option value="normal">Normal (Random)</option>
<option value="hard">Hard (Smart AI)</option>
</select>
</div>
<button class="btn-reset" onclick="resetAll()" aria-label="Reset Game">🔄 Reset</button>
</div>
<main class="game-area">
<div class="score-board">
<div class="score-card player">
<span class="label">You</span>
<span class="score" id="score">0</span>
</div>
<div class="score-divider">:</div>
<div class="score-card computer">
<span class="label">Computer</span>
<span class="score" id="cscore">0</span>
</div>
</div>
<h3 id="result" class="result-text">Make your move!</h3>
<div class="buttons">
<button onclick="game('Rock')" class="move-btn btn-rock" aria-label="Rock">
<div class="icon">👊</div>
<span>Rock</span>
</button>
<button onclick="game('Paper')" class="move-btn btn-paper" aria-label="Paper">
<div class="icon">🖐️</div>
<span>Paper</span>
</button>
<button onclick="game('Scissor')" class="move-btn btn-scissor" aria-label="Scissor">
<div class="icon">✌️</div>
<span>Scissor</span>
</button>
</div>
<div class="history-container">
<table class="history-table">
<thead>
<tr>
<th>Your Move</th>
<th>AI Move</th>
<th>Result</th>
</tr>
</thead>
<tbody id="history-body">
</tbody>
</table>
</div>
</main>
<footer>
<div class="lifetime-stats">
<span title="Lifetime Wins">🏆 <span id="life-wins">0</span></span>
<span title="Lifetime Losses">💀 <span id="life-losses">0</span></span>
<span title="Lifetime Draws">🤝 <span id="life-draws">0</span></span>
<button class="btn-clear-stats" onclick="clearLifetimeStats()">Clear Data</button>
</div>
</footer>
</div>
<script src="script.js"></script>
</body>
</html>