generated from Web-Development-Environments-2021/Assignment2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
311 lines (264 loc) · 10.3 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
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="./style.css" />
<link rel="stylesheet" type="text/css" href="./footer.css" />
<link rel="stylesheet" type="text/css" href="./settings.css" />
<link rel="shortcut icon" type="image/x-icon" href="images/pacManIcon.png">
<script src="./jquery-3.4.1.slim.min.js"></script>
<!-- <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.3.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.0/jquery.validate.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.0/additional-methods.min.js"></script> -->
</head>
<title>O&O Pac-Man</title>
<!-- </br></br></br></br></br></br> -->
<body style="background-color: #cfe0e8;">
<div id="menu">
<ul>
<li><img src="images/pacManIcon.png" alt="pacManLogo" height="40px" style="vertical-align: middle; cursor: pointer;" onclick= "showPage('Welcome');"></li>
<li><a onclick= "showPage('Welcome');" id = "welcomeUserName">Welcome</a></li>
<!-- <li><a onclick= "showPage('gamePage');"> Show Game</a></li> -->
<li><a onclick= "resetLoginForm()" id= "loginMenu">Login</a></li>
<li><a onclick= "resetRegisterForm()" id= "registerMenu"> Register</a></li>
<li><a onclick= "resetSettingsForm()" style="display: none;" id= "settingsMenu"> Settings</a></li>
<!-- <li><a onclick= "showPage('gamePage');"> Game</a></li> -->
<li><a id="buttomAbout" >About</a></li>
<li><a onclick= "logout()" style="display: none;" id= "logoutMenu"> Log Out</a></li>
<li><img src="images/ghost.png" alt="pacManLogo" height="40px" style="vertical-align: middle; cursor: pointer;" onclick= "modal.style.display = 'block';" ></li>
</ul>
</div>
<div class="container" id="container" name="container">
<div id = "Welcome" class="content">
<img src="images/pac-man-logo-crop.png" class="centerPNG">
<center>
<div id = "WelcomeButtomsAll" class="container">
<button class="homeButtom" onclick= "resetLoginForm()" type="button" id = "loginHome">Sign In</button>
<button class="homeButtom" onclick="resetRegisterForm()" type="button" id = "registerHome">Sign Up</button>
<!-- </br></br></br>
<button id="goToLogin" class="homeButtom" onclick="showPage('Settings');" type="button">Settings</button> -->
<button class="homeButtom" onclick= "resetSettingsForm()" type="button" style="display: none;" id= "settingsHome">Settings</button>
<button class="homeButtom" onclick= "logout()" type="button" style="display: none;" id= "logioutHome">Log Out</button>
</div>
</center>
</div>
<div id = "Login" style="display: none;" class="content">
<center>
<img src="images/pac-man-logo-tight.png" height="120px" >
<div class="login-box" >
<h2>Login</h2>
<form id="LoginForm" name="LoginForm" autocomplete="off">
<div class="user-box">
<input id="LoginUsername" type="text" name="LoginUsername" required="">
<label>Username</label>
</div>
<div class="user-box">
<input id="LoginPassword" type="password" name="LoginPassword" required="">
<label>Password</label>
</div>
<button id="SignInButton" name ="SignInButton" onclick="CheckIfUserExists()">
<span></span>
<span></span>
<span></span>
<span></span>
Sign In
</button>
</form>
</div>
</center>
</div>
<div id = "Register" style="display: none;" class="content">
<center><img src="images/pac-man-logo-tight.png" height="120px" >
<div class="login-box" >
<h2>Register</h2>
<form id="RegisterForm" name="RegisterForm" autocomplete="off">
<div class="user-box">
<label>Username</label>
<input id="Username" name="Username" type="text" required="" >
<span class='errorMsg'>
</span>
</div>
<div class="user-box">
<label>Password</label>
<input id="Password" name="Password" type="password" required="">
<span class='errorMsg'>
</span>
</div>
<div class="user-box">
<label>Full Name</label>
<input id="FullName" name="FullName" type="text" required="">
<span class='errorMsg'>
</span>
</div>
<div class="user-box">
<label>Email</label>
<input id="email" name="email" type="text" required="">
<span class='errorMsg'>
</span>
</div>
<div class="user-box">
<label>Birth Date</label>
<input type="date" id="date" name="date">
<span class='errorMsg'>
</span>
</div>
<button id="SignUpFinal" name="SignUpFinal" type="submit" onclick="AddUser()">
<span></span>
<span></span>
<span></span>
<span></span>
Sign Up
</button>
</form>
</div>
</center>
</div>
<!-- <div style="width: 100%;" class="content"> -->
<div id="gamePage" style="display: none;" class="content">
<!-- <embed loop="true" src="/music/Pac-man-theme-remix.wav" hidden="true" type="video/quicktime"></embed> -->
<div class="gameInfo">
<div id="score" class="scoreLabel">
<label for="lblScore" style="padding: 0 4px;">SCORE</label>
<input id="lblScore" type="text" class="gameData"/>
</div>
<div id="time" class="scoreLabel">
<label for="lblTime" style="padding: 0 4px;">TIME</label>
<input id="lblTime" type="text" class="gameData"/>
</div>
<div id="lives" class="scoreLabel">
<label for="lbllives" style="padding: 0 4px;">LIVES</label>
<input id="lbllives" type="text" class="gameData"/>
</div>
</div>
</br>
<div id="game" >
<!-- <canvas id="canvas" height="600" width="600"></canvas> -->
<canvas id="canvas" height="600" width="600"></canvas>
</div>
<div class="gameButtoms">
<button class="underGameButtom" id="play" onclick="togglePlay();" > ►❚❚ Music</button>
<!-- <button class="underGameButtom" id="puase" onclick="pauseSong();" type="button"> ❚❚ Pause Music</button> -->
<button class="underGameButtom" id="goToLogin" onclick="showPage('Settings');" type="button">New Game</button>
<button class="underGameButtom" onclick="toggleGame()" type="button">►❚❚ Game</button>
</div>
</div>
<div id="Settings" style="display: none;" class="content">
<center>
<img src="images/pac-man-logo-tight.png" height="120px" >
<div class="settings-box" >
<h2>Game Settings</h2></br>
<form action="" id="settingsForm" name="settingsForm" autocomplete="off">
<div class="user-box">
<input id="up" name="up" type="text" required="">
<label>Key Up</label>
</div>
<div class="user-box">
<input id="down" name="down" type="text" required="">
<label>Key Down</label>
</div>
<div class="user-box">
<input id="left" name="left" type="text" required="">
<label>Key Left</label>
</div>
<div class="user-box">
<input id="right" name="right" type="text" required="">
<label>Key Right</label>
</div>
<div class="user-box">
<input id="fivePoints" name="fivePoints" type="color" value="#32a852" class="bigball">
<label>Five Points Ball color</label>
</div>
<div class="user-box">
<input id="fifteenPoints" name="fifteenPoints" type="color" value = "#ff0000" class="mediumball">
<label>Fifteen Points Ball color</label>
</div>
<div class="user-box">
<input id="twentyFivePoints" name="twentyFivePoints" type="color" value="#3251a8" class="smallball">
<label>Twenty Five Points Ball color</label>
</div>
<div class="user-box">
<input id="numOfBalls" name="numOfBalls" type="number" value = "70" min="50" max="90" name="numOfBalls" required="">
<label>Number of balls in the game (between 50 to 90)</label>
</div>
<div class="user-box">
<input id="timerVal" name="timerVal" type="number" value = "60" min="60" name="" required="">
<label>Time (Min 60 Seconds)</label>
</div>
<div class="user-box">
<label for="Ghosts">Number Of Ghosts</label>
<select id="Ghosts" name="Choose">
<option >1</option>
<option selected="selected">2</option>
<option >3</option>
<option >4</option>
</select>
</div><br>
<div class="user-box">
<label for="levelOfSpeed">Game Speed</label>
<select id="levelOfSpeed" name="Choose">
<option value="1" >1 - Slowest</option>
<option >2</option>
<option >3</option>
<option >4</option>
<option selected="selected" value="5">5 - Average</option>
<option >6</option>
<option >7</option>
<option >8</option>
<option >9</option>
<option value="10">10 - Fastest</option>
</select>
</div>
<!-- <div class="user-box">
<label for="levelOfSpeed">(1 is slowest and 10 is fastest)</label>
</div> -->
<button id="startGame" onclick="goToGame();">
<span></span>
<span></span>
<span></span>
<span></span>
Start
</button>
<button id="randomGame" onclick="generateRandomGame();">
<span></span>
<span></span>
<span></span>
<span></span>
Random
</button>
</form>
</div>
</center>
<!-- <input id="userInput" type="number" value = "60" min="60"/></br> -->
<!-- <button id="goToLogin" onclick="showPage('gamePage');" type="button">New Game</button> -->
</div>
</div>
<!-- </div> -->
<div id="About" class="modal" >
<div class="modal-content">
<span class="close">×</span>
<center>
<p>Authors: Omer Niv & Omer Tagger</p>
<p>We used jQuery Validator to check forms</p>
<br>
<p>Difficulties:</p>
<p>1. Create HTML elements that are scattered across the screen in an organized way</p>
<p>2. Deleting JQuery validator errors after they appeared on the form</p>
</center>
</div>
</div>
<script type="text/javascript" src="./app.js"></script>
<script src="./validation.js"></script>
<script src="./about.js"></script>
<script src="./settings.js"></script>
<script src="./jquery.validate.js"></script>
</body>
<footer id="infoOfUs" class="footer">
<center>
<div class="footer-contact">
<a>Authors: Omer Niv & Omer Tagger</a></br>
<a>Contact Us: </a>
<a href="mailto:[email protected]">[email protected]</a>
<a href="mailto:[email protected]">[email protected]</a></h4></p>
</div>
</center>
</footer>
</html>