-
Notifications
You must be signed in to change notification settings - Fork 1
/
game.html
28 lines (27 loc) · 863 Bytes
/
game.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fruit Slicing Game</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<div id="gameArea">
<h1>Fruit Fade Out</h1>
<div id="score">Score: 0</div>
<div id="timer">Time: 30</div>
<div id="fruits"></div>
<div id="endGame" class="hidden">
<h2>Game Over!</h2>
<p>Your Score: <span id="finalScore"></span></p>
<button onclick="restartGame()">Restart</button>
</div>
</div>
<audio id="sliceSound" src="slice.mp3" preload="auto"></audio>
<audio id="backgroundMusic" src="background.mp3" loop="true" preload="auto"></audio>
<script src="logic.js"></script>
</center>
</body>
</html>