-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
44 lines (44 loc) · 1.46 KB
/
index.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="./src/assets/2048_Icon.png" type="image/x-icon" />
<title>2048</title>
</head>
<body>
<h1>2048</h1>
<div class="score-box" id="scoreBox">
Score: <span class="score">0</span> | High Score:
<span id="highScore">0</span>
</div>
<div class="board"></div>
<button id="newGameBtn">New Game</button>
<div class="info-icon">?</div>
<div class="info-box">
<p>How to play:</p>
<ul>
<li>Use arrow keys to move tiles.</li>
<li>Combine tiles with the same number to reach 2048.</li>
<li>A new tile with a value of 2 or 4 will appear after each move.</li>
<li>The game ends when there are no valid moves left.</li>
</ul>
</div>
<audio id="rowShiftSound">
<source
src="./src/assets/mixkit-game-ball-tap-2073.wav"
type="audio/mpeg"
/>
Your browser does not support the audio element.
</audio>
<audio id="winSound">
<source src="./src/assets/party-horn.mp3" type="audio/mpeg" />
Your browser does not support the audio element.
</audio>
<audio id="loseSound">
<source src="./src/assets/lose.mp3" type="audio/mpeg" />
Your browser does not support the audio element.
</audio>
<script type="module" src="/src/main.ts"></script>
</body>
</html>