forked from anlbora/SnakeGame---JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
41 lines (36 loc) · 1.23 KB
/
index.html
File metadata and controls
41 lines (36 loc) · 1.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Snake Game</title>
<link rel="stylesheet" href="style.css">
<script src="script.js" defer></script>
</head>
<body>
<div class="wrapper">
<div class="game-details">
<span class="score">Score: 0</span>
<span class="highscore">High Score: 0</span>
</div>
<div class="play-board"></div>
</div>
<!-- Game Over Modal -->
<div class="game-over-modal" id="gameOverModal">
<div class="game-over-content">
<h2>Game Over!</h2>
<p>Your Score: <span id="finalScore">0</span></p>
<button onclick="restartGame()">Replay</button>
</div>
</div>
<!-- Difficulty Selection Modal -->
<div class="difficulty-modal" id="difficultyModal">
<div class="difficulty-content">
<h2>Select Difficulty</h2>
<button onclick="startGame('easy')">Easy</button>
<button onclick="startGame('medium')">Medium</button>
<button onclick="startGame('hard')">Hard</button>
</div>
</div>
</body>
</html>