-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
59 lines (54 loc) · 2.15 KB
/
index.html
File metadata and controls
59 lines (54 loc) · 2.15 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tic-Tac-Toe</title>
<link rel="stylesheet" href="/src/style.css" />
</head>
<body>
<div class="app">
<div class="title-row">
<h1 class="title">Tic-Tac-Toe</h1>
<button class="mute-btn" id="mute-btn" aria-label="Toggle sound" aria-pressed="false">🔊</button>
<span class="difficulty-label">Difficulty:</span>
<select class="difficulty-select" id="difficulty-select" aria-label="Select difficulty">
<option value="0">Easy</option>
<option value="1" selected>Medium</option>
<option value="2">Hard</option>
<option value="3">Unbeatable</option>
</select>
</div>
<!-- Score board (SCORE-01) — in-memory, resets on page refresh -->
<div class="scoreboard" aria-label="Score">
<div class="score-item">
<span class="score-label">You</span>
<span class="score-value" id="score-wins">0</span>
</div>
<div class="score-item score-item--draw">
<span class="score-label">Draw</span>
<span class="score-value" id="score-draws">0</span>
</div>
<div class="score-item score-item--loss">
<span class="score-label">CPU</span>
<span class="score-value" id="score-losses">0</span>
</div>
</div>
<!-- Turn indicator (UI-02) -->
<p class="status-message" id="status-message" aria-live="polite">Your turn</p>
<!-- 3×3 game board (UI-01) — cells injected by JS -->
<div class="board-wrapper">
<div class="board" id="board" role="grid" aria-label="Tic-tac-toe board">
<!-- 9 .cell divs are created by main.js on init -->
</div>
<!-- Win line overlay — sibling of .board so it survives boardEl.innerHTML='' -->
<div class="win-line" id="win-line" hidden aria-hidden="true"></div>
</div>
<!-- Restart button (UI-04) — hidden until game ends -->
<button class="restart-btn" id="restart-btn" hidden aria-label="Start a new game">
New Game
</button>
</div>
<script type="module" src="/src/main.js"></script>
</body>
</html>