-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgames-puzzle.html
200 lines (180 loc) · 9.57 KB
/
games-puzzle.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!--Name: Ko Jia Ling
Admin no.: 190681D-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Games - Puzzle</title>
<link rel="stylesheet" href="bootstrap-4.3.1-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/games-puzzle.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="bootstrap-4.3.1-dist/jquery-3.4.1.min.js"></script>
<script src="bootstrap-4.3.1-dist/js/bootstrap.min.js"></script>
<script src="js/main.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light">
<a class="navbar-brand retro" href="index.html">RETROGRADE</a>
<div class="navbar-toggler navbar-toggler-icon p-0" data-toggle="collapse" data-target="#collapsibleNavbar">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
</div>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" href="games.html">GAMES</a>
</li>
<li class="nav-item">
<a class="nav-link" href="community.html">COMMUNITY</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">CONTACT</a>
</li>
<li class="nav-item dropdown" id="data">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
DATA
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="formData.html">FORM DATA</a>
<a class="dropdown-item" href="redemptionData.html">REDEMPTION DATA</a>
</div>
</li>
</ul>
</div>
<div class="collapse navbar-collapse justify-content-end" id="collapsibleNavbar">
<ul class="navbar-nav">
<li id="loginSignUp">
<a class="nav-link" href="login.html"><i class="fa fa-user" aria-hidden="true"></i> LOG IN | SIGN UP</a>
</li>
<div class="dropdown dropdown-menu-right" id="profileDropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="" alt="">
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="redemption.html">REDEMPTION</a>
<a class="dropdown-item" href="#" onclick="viewOwnProfile()"><i class="fa fa-user"></i> PROFILE</a>
<a class="dropdown-item" href="settings.html"><i class="fa fa-wrench"></i> SETTINGS</a>
<a class="dropdown-item" href="#" onclick="logOut()"><i class="fa fa-sign-out" aria-hidden="true"></i> LOG OUT</a>
</div>
</div>
</ul>
</div>
</nav>
<div class="container-fluid mt-4">
<div class="row justify-content-center">
<div class="col-lg-10">
<nav aria-label="breadcrumb"> <!--Breadcrumb-->
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="games.html">Games</a></li>
<li class="breadcrumb-item active" aria-current="#">Puzzle</li>
</ol>
</nav>
<button class="btn btn-secondary" data-toggle="modal" data-target="#howToPlay">
<i class="fa fa-question fa-lg" aria-hidden="true"></i>
</button>
</div>
<div class="col-lg-8">
<div class="row mt-4" id="gameboard">
<div class="col-lg-6 hide" id="imgGrid">
<div class="row ml-4 mt-4">
<div class="imgBlock d-inline-block" id="1" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="2" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="3" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="4" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="5" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
</div> <!--Img Row A-->
<div class="row ml-4">
<div class="imgBlock d-inline-block" id="6" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="7" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="8" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="9" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="10" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
</div><!--Img Row B-->
<div class="row ml-4">
<div class="imgBlock d-inline-block" id="11" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="12" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="13" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="14" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="15" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
</div> <!--Img Row C-->
<div class="row ml-4">
<div class="imgBlock d-inline-block" id="16" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="17" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="18" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="19" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="20" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
</div> <!--Img Row D-->
<div class="row ml-4 mb-4">
<div class="imgBlock d-inline-block" id="21" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="22" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="23" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="24" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
<div class="imgBlock d-inline-block" id="25" ondrop="drop(event,this)" ondragover="allowDrop(event,this)"></div>
</div> <!--Img Row E-->
</div> <!--Img Grid-->
<div class="col-lg-6 hide my-auto" id="gameInfo">
<p class="retro text-center mt-4 mb-2">Final Image</p>
<img class="d-block mx-auto" src="" alt="final image" id="finalImage">
<p class="retro text-center mt-4" id="stats-time">Time: </p>
</div>
</div> <!--Game Board-->
<p class="retro text-center mt-1" id="personalBest">Personal Best: -</p>
<p class="bigPixel-light text-center mt-1" id="logInToSave"><a class="bigPixel-reg" href="login.html">Log in</a> now to save your score!</p>
</div>
<div class="col-lg-12" id="puzzleTitle">
<h1 class="retro text-center">PUZZLE</h1>
</div>
<div class="col-lg-12" id="finalTime">
<p class="retro text-center"></p>
</div>
<div class="col-lg-12" id="buttons">
<button class="retro btn btn-secondary mt-2 d-block mx-auto" id="startGame" onclick="startGame();">START</button>
</div>
</div>
<div class="row justify-content-center"> <!--Leaderboards-->
<div class="col-lg-6">
<table class="table" id="puzzleLeaderboardTable">
<thead>
<tr class="bigPixel-reg"><th>Username</th> <th>Timing</th></tr>
</thead>
<tbody></tbody>
</table>
</div>
</div> <!--Row-->
</div> <!--Container-->
<div class="modal fade text-dark" id="howToPlay" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title mr-auto" id="modalLabel">How to Play</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-12">
<h5 class="modal-title underline"><u>Game Play</u></h5>
<p>
Swap the pieces to match the final image.<br>
This game is ranked according to the amount of time you take to finish the puzzle.
</p>
</div>
<div class="col-lg-12">
<h5 class="modal-title underline"><u>Scoring</u></h5>
<p>
For every puzzle completed:<br>
+5 exp<br>
+5 <i class="fa fa-lock fa-bolt" aria-hidden="true"></i>
</p>
</div>
</div>
</div> <!--Modal body-->
</div>
</div>
</div> <!--How to Play Modal-->
</body>
<script src="js/games-puzzle.js"></script>
</html>