-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
242 lines (210 loc) · 9.93 KB
/
index.html
File metadata and controls
242 lines (210 loc) · 9.93 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script src="./jquery-3.4.1.slim.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/jquery.validate.min.js"
type="text/javascript"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/additional-methods.min.js"
type="text/javascript"></script>
<title>Play Pac-Man Game</title>
</head>
<body>
<header>
<div id="logo">
<img src="./img/logo5.png" alt="" style="height: 50px; float: left;">
Tom Duany
<br>
Almog Sarafian
</div>
</header>
<div id="app">
<nav>
<ul id="nav" style="display: block;">
<br>
<li><a href="#welcome" onclick="show('welcome');">Welcome</a></li>
<br>
<li><a href="#register" onclick="show('register');">Register</a></li>
<br>
<li><a href="#login" onclick="show('login');">Login</a></li>
<br>
<li><a href="#setting" onclick="show('setting');">Settings</a></li>
<br>
<li><a href="#about" onclick="aboutFunction()">About</a></li>
</ul>
<div id="showSetting" style="float: left; text-align: left; color: aliceblue; display: none; margin-top: 20%;">
<c>5Pt:</c>
<span><input type="color" name="5PtKeyColor" style="width: 30px; margin-left: 13px;border-bottom:0px;"></span>
<br>
<br>
<c>15Pt:</c>
<span><input type="color" name="15PtKeyColor" style="width: 30px;border-bottom:0px;"></span>
<br>
<br>
<c>25Pt:</c>
<span><input type="color" name="25PtKeyColor" style="width: 30px;border-bottom:0px;"></span>
<br>
<br>
<c>Up-Key:</c>
<br>
<span name="upKey" style="color: rgb(243, 140, 4);"> </span>
<br>
<br>
<c>Down-Key:</c>
<br>
<span name="downKey" style="color: rgb(243, 140, 4);"> </span>
<br>
<br>
<c>Left-Key:</c>
<br>
<span name="leftKey" style="color: rgb(243, 140, 4);"> </span>
<br>
<br>
<c>Right-Key:</c>
<br>
<span name="rightKey" style="color: rgb(243, 140, 4);"> </span>
<br>
<br>
<c>Balls:</c>
<br>
<span name="ballsNum" style="color: rgb(243, 140, 4);"> </span>
<br>
<br>
<c>Monster:</c>
<br>
<span name="monNum" style="color: rgb(243, 140, 4);"></span>
</div>
</nav>
<main>
<div id="welcome" class="context" style="display:block">
<img src="img/welcome.png" />
<h2>Let's play!</h2>
<button type="button" class="buttonWelcom"
onclick="show('register');">Registration</button>
<button type="button" class="buttonWelcom" onclick="show('login');">Login</button>
</div>
<div id="register" class="context" style="display:none">
<h2><b>Register</b></h2>
<img src="img/register.png" />
<br>
<br>
<form id="registrationForm" action="">
<input id="userName" name="userName" type="text" placeholder="User Name">
<br>
<input id="userPassword" name="userPassword" type="password" placeholder="Password">
<br>
<input id="userFirstName" name="userFirstName" type="text" placeholder="First Name">
<br>
<input id="userLastName" name="userLastName" type="text" placeholder="Last Name">
<br>
<input type="text" id="userEmail" name="userEmail" placeholder="Email">
<br>
<input type="text" id="date" name="birthdate" onfocus="(this.type='date')" placeholder="Date Of Birth" >
<br>
<br>
<input class="buttonRegular" type="submit" id="sign" value="Sign Up" onclick="" />
<input class="buttonRegular" type="button" onclick="restFunction()" value="Reset Form">
</form>
</div>
<div id="login" class="context" style="display:none">
<h2><b>Log In</b></h2>
<img src="img/login.png" />
<br>
<br>
<form id="loginForm" action="">
<input id="userNameLogin" type="text" placeholder="User Name">
<br>
<br>
<input id="passwordLogin" type="password" placeholder="Password">
<br>
<br>
<input class="buttonRegular" type="button" onclick="validateLogin()" value="Login">
</form>
</div>
<div id="setting" class="context" style="display:none">
<h2>Game Settings:</h2>
<br>
<form id="settingsForm" action="">
<img src="img/arrowRight.jpeg" style="margin-bottom: -10px;margin-right: 6px;"/>
<input id="rightKey" name="rightKey" type="text" onkeypress="keyCodeRight(event)" placeholder="Right Key">
<br>
<img src="img/arrowLeft.jpeg" style="margin-bottom: -10px; margin-right: 6px;" />
<input id="leftKey" name="leftKey" type="text" onkeypress="keyCodeLeft(event)" placeholder="Left Key">
<br>
<img src="img/arrowUp.jpeg" style="margin-bottom: -10px;margin-right:6px;"/>
<input id="upKey" name="upKey" type="text" onkeypress="keyCodeUp(event)" placeholder="Up Key">
<br>
<img src="img/arrowDown.jpeg" style="margin-bottom: -10px;margin-right: 6px;"/>
<input id="downKey" name="downKey" type="text" onkeypress="keyCodeDown(event)" placeholder="Down Key">
<br>
<img src="img/bLogo.png" style="margin-bottom: -10px; margin-right: 6px;" />
<input id="ballsNum" name="ballsNum" type="text" placeholder="Balls Number">
<br>
<br>
<label><b style="color: aliceblue;">Choose different colors for balls:</b></label>
<br>
<label><b style="color: aliceblue;">5 Points:</b></label>
<input id="5BallColor" name="5BallColor" type="color" value="#6F4E37" style="width: 10%; margin-left: 10px;border-bottom:0px;">
<br>
<label><b style="color: aliceblue;">15 Points:</b></label>
<input id="15BallColor" name="15BallColor" type="color" value="#6F4E37" style="width: 10%;border-bottom:0px;">
<br>
<label><b style="color: aliceblue;">25 Points:</b></label>
<input id="25BallColor" name="25BallColor" type="color" value="#6F4E37" style="width: 10%;border-bottom:0px;">
<br>
<br>
<img src="img/Tlogo.png" style="margin-bottom: -10px; margin-right: 6px;" />
<input id="timeGame" name="timeGame" type="text" placeholder="Time To Play(60 sec minimum)">
<br>
<br>
<img src="img/mLogo.png" style="margin-bottom: -10px; margin-right: 6px;" />
<input id="monstersNum" name="monstersNum" type="text" placeholder="Monsters Number">
<br>
<br>
<input type="submit" value="Start Play!" class="buttonRegular" />
<input type="button" class="buttonRegular" onclick="randomSettings()" value="Random Settings">
</form>
</div>
<div id="game" class="context" style="display:none">
<div>
<input style="margin-bottom: 8px;" type="button" id="NewGame" class="buttonRegular" value="Start New" onclick="startNewGame()">
</div>
<canvas id="canvas" height="600px" width="1200px"></canvas>
</div>
<dialog id="about" style="text-align: left;">
<button type="button" style="float: right;" onclick="closeAboutFunction()">X</button>
<b> Presentors: Tom Duany & </b>
<b>Almog Sarafian</b>
<p> We used jQuery validation plugin in the login and registration pages
and for more private functions.
</p>
<p>The difficulties we encountered were mainly on the game page where we needed to add additional characters and functionality.</p>
</dialog>
</main>
<aside>
<br>
<h5>Hello </h5><b id="enterName" style="color: rgb(243, 140, 4);">New User</b>
<h5>Lets Play!</h5>
<div id="gameData" style="display: none;">
<span style="color: aliceblue;">Score: </span>
<input id="lblScore" style="width: 80%; color: rgb(243, 140, 4);text-align:center;border-bottom:0px;"/>
<br>
<br>
<span style="color: aliceblue;">Time:</span>
<div id="lblTime" style="color: rgb(243, 140, 4);"></div>
<br>
<h4 id="redMonster" style="color: rgb(243, 52, 4); display: none;">Watch out for the red monster!</h4>
<span id="lives" style="color: aliceblue;">Lifes: </span>
<br>
</div>
</aside>
</div>
<footer><strong>Contact us</strong><span style="float: left;margin-left:25px;">Almog - almogsa@post.bgu.ac.il</span>
<span style="float: right;margin-right: 25px" >Tom - tomdu@post.bgu.ac.il</span> </footer>
<script src="./app.js"></script>
<script src="./register_login.js"></script>
<script src="./settings.js"></script>
</body>
</html>