Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
54 lines (49 loc) · 2.07 KB
/
Copy pathindex.html
File metadata and controls
54 lines (49 loc) · 2.07 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
<!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">
</head>
<body>
<div class="game-wrapper">
<div class="top-bar">
<h1>🐍 Snake Game</h1>
</div>
<div class="game-area">
<div class="left-panel">
<div class="info-board">
<div class="score">Score: <span id="score">0</span></div>
<div class="high-score">High Score: <span id="highScore">0</span></div>
</div>
<div class="controls">
<div class="difficulty-selector">
<label for="difficulty">Difficulty:</label>
<select id="difficulty" class="difficulty-select">
<option value="easy">Easy</option>
<option value="medium" selected>Medium</option>
<option value="hard">Hard</option>
</select>
</div>
<button id="startBtn" class="btn btn-primary">Start Game</button>
<button id="pauseBtn" class="btn btn-warning">Pause</button>
<button id="resetBtn" class="btn btn-danger">🔄 Restart</button>
</div>
<div class="instructions">
<h3>Instructions:</h3>
<ul>
<li>Use <strong>Arrow Keys</strong></li>
<li>Eat mangoes 🥭 to grow</li>
<li>Don't hit walls or yourself!</li>
</ul>
</div>
</div>
<div class="canvas-container">
<canvas id="gameCanvas" width="800" height="600"></canvas>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>