-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
36 lines (36 loc) · 1.27 KB
/
index.html
File metadata and controls
36 lines (36 loc) · 1.27 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
<!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="snakeGame.js"></script>
</head>
<body onload="createGame()" onkeyup="snakeTurn(event)">
<div class="game-container">
<div id="food"></div>
<div id="gift"><i></i></div>
<div id="snake-head"></div>
<div id="snake-body"></div>
<div id="powerup-timer"><div class="time-loader"></div></div>
<ul id="life">
<li><div class="heart"></div></li>
<li><div class="heart"></div></li>
<li><div class="heart"></div></li>
</ul>
<div id="game-over">GAME OVER <p id="total-score">Total Score <span id="ts"></span></p>
<button onclick="createSnake();">Retry</button>
</div>
<div class="gift-content">
<p class="gift-line"></p>
<p class="gift-line"></p>
</div>
</div>
<div class="game-control-container">
<button id="start-game" onclick="startGame()">Start Game</button>
<p id="game-score">0</p>
<button id="pause-game" onclick="pauseGame()">Pause Game</button>
</div>
</body>
</html>