File size: 1,608 Bytes
18935fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2048 Game</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>2048</h1>
            <div class="scores">
                <div class="score-box">
                    <div class="score-title">SCORE</div>
                    <div id="score">0</div>
                </div>
                <div class="score-box">
                    <div class="score-title">BEST</div>
                    <div id="best-score">0</div>
                </div>
            </div>
        </div>
        <div class="game-intro">
            <p>Join the tiles, get to <strong>2048!</strong></p>
            <button id="new-game">New Game</button>
        </div>
        <div class="game-container">
            <div class="grid-container"></div>
            <div class="game-over">
                <p>Game Over!</p>
                <button id="try-again">Try Again</button>
            </div>
            <div class="game-won">
                <p>You Win!</p>
                <button id="keep-going">Keep Going</button>
            </div>
        </div>
        <p class="game-explanation">
            <strong>HOW TO PLAY:</strong> Use your <strong>arrow keys</strong> to move the tiles. When two tiles with the same number touch, they <strong>merge into one!</strong>
        </p>
    </div>
    <script src="game.js"></script>
</body>
</html>