-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
170 lines (140 loc) · 6.84 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="img/2048/2048-logo.png" type="image/x-icon">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" integrity="sha512-c42qTSw/wPZ3/5LBzD+Bw5f7bSF2oxou6wEb+I/lqeaKV5FDIfMvvRp772y4jcJLKuGUOpbJMdg/BTl50fJYAw==" crossorigin="anonymous" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Teko:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/instruction.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<title>2048</title>
</head>
<body>
<div class="row">
<div class="col-1">
<div class="heading-box">
2048
</div>
<div class="settings">
<div class="score hidden-score-1" id="score">
</div>
<div class="settings-items">
<button class="restart help" id="restart"><i class="fas fa-sync-alt"></i></button>
<button class="info help" onclick="openModal();currentSlide(1)"><i class="fas fa-info"></i></button>
</div>
<div class="score hidden-score" id="score">
</div>
<div class="level">
<button class="easy" id="easy" onclick="toEasy(event)" value="Easy">Easy</button>
<button class="hard active" id="hard" onclick="toHard()" value="Hard">Hard</button>
</div>
</div>
</div>
<div class="col-2">
<div class="container" id="gestureZone">
<div id="0-0" class="empty-square"></div>
<div id="0-1" class="empty-square"></div>
<div id="0-2" class="empty-square"></div>
<div id="0-3" class="empty-square"></div>
<div id="0-4" class="empty-square hidden"></div>
<div id="1-0" class="empty-square"></div>
<div id="1-1" class="empty-square"></div>
<div id="1-2" class="empty-square"></div>
<div id="1-3" class="empty-square"></div>
<div id="1-4" class="empty-square hidden"></div>
<div id="2-0" class="empty-square"></div>
<div id="2-1" class="empty-square"></div>
<div id="2-2" class="empty-square"></div>
<div id="2-3" class="empty-square"></div>
<div id="2-4" class="empty-square hidden"></div>
<div id="3-0" class="empty-square"></div>
<div id="3-1" class="empty-square"></div>
<div id="3-2" class="empty-square"></div>
<div id="3-3" class="empty-square"></div>
<div id="3-4" class="empty-square hidden"></div>
<div id="4-0" class="empty-square hidden"></div>
<div id="4-1" class="empty-square hidden"></div>
<div id="4-2" class="empty-square hidden"></div>
<div id="4-3" class="empty-square hidden"></div>
<div id="4-4" class="empty-square hidden"></div>
</div>
</div>
</div>
<div class="pillar">
</div>
<div class="game-going animate__animated animate__animate__fadeIn" id="game-over">
<h1>GAME OVER</h1>
<button class="playing-now" onclick="playAgain()"><h1>Play Again</h1> <i class="fas fa-sync-alt"></i></button>
</div>
<!-- <h2 style="text-align:center">Lightbox</h2> -->
<div class="ROW">
<div class="column">
<div src="div_nature.jpg" style="width:100%" onclick="openModal();currentSlide(1)" class="hover-shadow cursor">
</div>
<!-- <div class="column">
<img src="img_snow.jpg" style="width:100%" onclick="openModal();currentSlide(2)" class="hover-shadow cursor">
</div>
<div class="column">
<img src="img_mountains.jpg" style="width:100%" onclick="openModal();currentSlide(3)" class="hover-shadow cursor">
</div>
<div class="column">
<img src="img_lights.jpg" style="width:100%" onclick="openModal();currentSlide(4)" class="hover-shadow cursor">
</div> -->
</div>
<div id="myModal" class="modal">
<span class="close cursor" onclick="closeModal()">×</span>
<div class="modal-content">
<h1 class="instructionHeading">How to Play</h1>
<div class="caption-container">
<h2 id="caption"></h2>
</div>
<div class="mySlides">
<!-- <div class="numbertext">1 / 4</div> -->
<div><img class="imageSlides demo" src="img/2048/2048-1.png" alt="There are some numbers on the board.">
</div>
</div>
<div class="mySlides">
<!-- <div class="numbertext">2 / 4</div> -->
<div><img class="imageSlides demo" src="img/2048/2048-3.png" alt="Swipe/Key Press any direction (Up, Down, Left, Right) to move all tiles.">
</div>
</div>
<div class="mySlides">
<!-- <div class="numbertext">3 / 4</div> -->
<div><img class="imageSlides demo" src="img/2048/2048-2.png" alt="A new tile of 2 will appear on the board after every move.">
</div>
</div>
<div class="mySlides">
<!-- <div class="numbertext">4 / 4</div> -->
<div><img class="imageSlides demo" src="img/2048/2048-4.2.png" alt="When two tiles with same number touch each other, they merge into one!">
</div>
</div>
<div class="mySlides">
<!-- <div class="numbertext">5 / 4</div> -->
<div><img class="imageSlides demo" src="img/2048/2048-5.png" alt="When the board is filled up, you lose."></div>
</div>
<a class="prev" onclick="plusSlides(-1)">❮</a>
<a class="next" onclick="plusSlides(1)">❯</a>
<div class="column">
<div class="demo cursor" style=" background: pink; width:100%" onclick="currentSlide(1)" alt="Nature and sunrise">
</div>
<div class="column">
<div class="demo cursor" style=" background: pink; width:100%" onclick="currentSlide(2)" alt="Snow">
</div>
<div class="column">
<div class="demo cursor" style=" background: pink; width:100%" onclick="currentSlide(3)" alt="Mountains and fjords">
</div>
<div class="column">
<div class="demo cursor" style=" background: pink; width:100%" onclick="currentSlide(4)" alt="Northern Lights">
</div>
</div>
</div>
<script src="js/script.js"></script>
<script src="js/touch.js"></script>
<script src="js/style.js"></script>
<script src="js/instruction.js"></script>
</body>
</html>