-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (38 loc) · 1.17 KB
/
index.html
File metadata and controls
38 lines (38 loc) · 1.17 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mario Platformer</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div id="gameContainer">
<div id="hud">
<div class="hud-item">
<span>SCORE</span>
<span id="score">000000</span>
</div>
<div class="hud-item">
<span>🪙</span>
<span id="coins">00</span>
</div>
<div class="hud-item">
<span>❤️</span>
<span id="lives">3</span>
</div>
</div>
<canvas id="gameCanvas" width="800" height="400"></canvas>
<div id="gameOver" class="screen hidden">
<h1>GAME OVER</h1>
<button onclick="restartGame()">Try Again</button>
</div>
<div id="winScreen" class="screen hidden">
<h1>YOU WIN!</h1>
<p>Congratulations!</p>
<button onclick="restartGame()">Play Again</button>
</div>
</div>
<script src="js/game.js"></script>
</body>
</html>