-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
36 lines (29 loc) · 1.13 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minesweeper Game</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Dark Mode Toggle Switch -->
<button id="dark-mode-toggle" onclick="toggleDarkMode()">🌙</button>
<h1>💣 Minesweeper 💣</h1>
<!-- Timer and Flag Counter -->
<div id="game-info">
<span id="flag-counter">Flags Left: 10</span>
</div>
<!-- Floating Notification for Start/Game Over Messages -->
<div id="popup-notification" class="hidden">Welcome to Minesweeper! Click any cell to start.</div>
<!-- Game Container -->
<div id="game-container"></div>
<!-- Dynamic Start/Restart Button -->
<button id="restart-button" onclick="initGame()">Start Game</button>
<!-- Audio elements for sound effects -->
<audio id="click-sound" src="assets/sfx/click.wav"></audio>
<audio id="flag-sound" src="assets/sfx/flag.wav"></audio>
<audio id="explosion-sound" src="assets/sfx/explosion.wav"></audio>
<script src="script.js"></script>
</body>
</html>