generated from Code-Institute-Org/gitpod-full-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.html
439 lines (426 loc) · 14.9 KB
/
game.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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Game | fledgling</title>
<meta
name="description"
content="A multiple-choice question game to help you hone your bird identification skills"
/>
<meta
name="keywords"
content="bird, birdwatching, bird game, eBird, bird sightings, bird identification game"
/>
<meta name="author" content="flegling" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn"
crossorigin="anonymous"
/>
<script
src="https://kit.fontawesome.com/e4ffee1eee.js"
crossorigin="anonymous"
></script>
<link rel="stylesheet" href="assets/css/style.css" type="text/css" />
</head>
<body>
<!--Modal- Sourced from Bootstrap Library-->
<div
class="modal fade"
id="instructionsModal"
tabindex="-1"
aria-labelledby="instructionsModalLabel"
aria-hidden="true"
>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="instructionsModalLabel">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 text-left">
<ul>
<li>
The purpose of the game is to correctly answer questions to help
you identify these 5 birds.
</li>
<li>Click 'Start Game' to begin.</li>
<li>
There are 5 rounds, 1 for each bird. To start a round, select
the bird you would like to identify and click “Select”.
</li>
<li>
There will be 4 turns in each round. For every turn, a different
feature of the bird you are trying to identify will be revealed.
You will be asked a multiple-choice question about the feature
pictured.
</li>
<li>
The questions run through features commonly used for bird
identification; size, colour, habitat and other distinctive
features.
</li>
<li>
For each turn, select the answer you think best matches the
image shown, and click “Submit”.
</li>
<li>
Once you have completed each round, you will get shown your
score, and the bird will be revealed.
</li>
<li>
Once you have completed the final round, all the birds will be
identified and your overall score for the game will be shown.
</li>
<li>You can then choose to play again to beat your score.</li>
<li>
You can use the game’s questions to help you identify birds you
see in your local area.
</li>
<li>Good luck!</li>
</ul>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
>
Close
</button>
</div>
</div>
</div>
</div>
<!--Nav - Sourced From Bootstrap Library-->
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand" id="navbar-logo" href="index.html">fledgling</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarTogglerDemo02"
aria-controls="navbarTogglerDemo02"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div
class="collapse navbar-collapse justify-content-end"
id="navbarTogglerDemo02"
>
<ul class="navbar-nav">
<li class="nav-item d-none" id="how-to-play-button">
<button
type="button"
class="btn btn-outline-dark btn-margin"
data-toggle="modal"
data-target="#instructionsModal"
>
How To Play
</button>
</li>
<li class="nav-item" id="sightings-button">
<a
role="button"
class="btn btn-outline-dark btn-margin"
href="sightings.html"
>Find Sightings Near You</a
>
</li>
<li class="nav-item" id="clock-nav-button">
<a
role="button"
class="btn btn-outline-dark btn-margin"
href="clock.html"
>Bird Song Clock</a
>
</li>
</ul>
</div>
</div>
</nav>
<!--Start Game Screen-->
<div class="container center">
<!--Game Box-->
<div id="game-box" class="pb-5 pb-lg-0">
<!--Bird Collection-->
<div id="bird-collection" class="row centered-row collection-view">
<!--Surrounding div to fix ipad stretch issue-->
<div>
<img
id="blackbird"
src="assets/images/bb-outline.png"
alt="outline of a bird"
/>
<img
id="blueTit"
src="assets/images/bt-outline.png"
alt="outline of a bird"
/>
<img
id="cormorant"
src="assets/images/cm-outline.png"
alt="outline of a bird with wide wings"
/>
<img
id="magpie"
src="assets/images/mp-outline.png"
alt="outline of a bird with a long tail"
/>
<img
id="goldfinch"
src="assets/images/gf-outline.png"
alt="outline of a bird"
/>
</div>
</div>
<!--Game Inital Load Screen -->
<div id="game-initial-load-screen">
<div class="row centered-row">
<h2 class="landing-page-about">
Can you identify these common British birds?
</h2>
</div>
<div class="row centered-row">
<button
type="button"
id="start-new-game"
data-button-command="start-new-game"
class="btn btn-outline-dark btn-margin"
>
Start Game
</button>
<!-- Button trigger modal for instructions-->
<button
type="button"
class="btn btn-outline-dark btn-margin"
data-toggle="modal"
data-target="#instructionsModal"
>
How To Play
</button>
</div>
</div>
<!--Bird Collection Screen -->
<div id="bird-collection-screen" class="d-none">
<div class="row centered-row">
<div class="col-12">
<p>Round <span id="game-round-number"></span>/5</p>
</div>
</div>
<div class="row centered-row">
<div class="col-12">
<h3>Pick your bird</h3>
</div>
</div>
</div>
<!--Submit Bird Button Box -->
<div id="submit-bird-button-box" class="d-none">
<div class="row justify-content-center">
<p id="submit-bird-alert" class="d-none small alerts">
Please select a bird
</p>
</div>
<div class="row justify-content-center">
<button
type="button"
data-button-command="submit-bird"
id="submit-bird"
class="btn btn-outline-dark btn-margin disabled"
>
Select
</button>
</div>
</div>
<!--End Game Screen -->
<div id="end-game-screen" class="d-none">
<div class="row centered-row">
<div class="col-12">
<h3>
Your final score is <span id="final-game-score"></span>/20
</h3>
</div>
</div>
<div class="row centered-row">
<div class="col-12">
<p id="final-results-feedback"></p>
</div>
</div>
</div>
<!--End Game Button Box -->
<div id="end-game-button-box" class="d-none row centered-row">
<a
role="button"
class="btn btn-outline-dark btn-margin"
href="sightings.html"
>Find Sightings Near You</a
>
<button
type="button"
data-button-command="play-again"
class="btn btn-outline-dark btn-margin"
>
Play Again
</button>
</div>
<!--Round Box -->
<div id="round-box" class="d-none row centered-row">
<div class="row centered-row d-flex align-items-center">
<div class="col-lg-5 order-lg-2">
<div id="question-image"></div>
<div class="icons">
<span id="size" class="black"
><i class="fa-solid fa-ruler-horizontal"></i></span
><span id="colour" class="black"
><i class="fa-solid fa-palette"></i
></span>
<span id="location" class="black"
><i class="fa-solid fa-binoculars"></i></span
><span id="features" class="black"
><i class="fa-solid fa-magnifying-glass"></i
></span>
</div>
</div>
<!--Questions Box -->
<div id="questions-box" class="col-lg-7 order-lg-1">
<div class="row justify-content-center justify-content-lg-start">
<h3 id="question-text">Question Text</h3>
</div>
<div>
<div
class="row justify-content-center justify-content-lg-start"
>
<button type="button" id="answer-option-1" class="answer-btn">
Option 1
</button>
<button type="button" id="answer-option-2" class="answer-btn">
Option 2
</button>
</div>
<div
class="row justify-content-center justify-content-lg-start"
>
<button type="button" id="answer-option-3" class="answer-btn">
Option 3
</button>
<button type="button" id="answer-option-4" class="answer-btn">
Option 4
</button>
</div>
</div>
<div class="row justify-content-center justify-content-lg-start">
<p id="answer-submit-alert" class="d-none small alerts">
Please select an answer
</p>
</div>
<div class="row justify-content-center justify-content-lg-start">
<button
type="button"
data-button-command="submit-answer"
class="btn btn-success submit-btn"
>
Submit
</button>
</div>
</div>
<!--Round Results Box -->
<div id="round-results-box" class="col-lg-7 order-lg-1 d-none">
<div class="row justify-content-center justify-content-lg-start">
<h3>
Your score this round is <span id="results-text"></span> /4
</h3>
</div>
<div class="row">
<p id="feedback" class="text-left"></p>
</div>
<div class="row">
<p id="bird-fact" class="text-left"></p>
</div>
<div class="row justify-content-center justify-content-lg-start">
<button
type="button"
data-button-command="start-next-round"
class="btn btn-outline-dark btn-margin"
>
Continue
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Footer-->
<footer class="mt-auto d-flex align-self-end">
<div class="container">
<div class="row">
<div class="col-sm-6 text-sm-left">
<h3>fledgling</h3>
<p class="small mb-md-2">
An interactive website designed to engage people in birdwatching
</p>
</div>
<div class="col-sm-6 text-sm-right">
<ul class="list-inline social-links">
<li class="list-inline-item">
<a target="_blank" href="https://www.facebook.com">
<i
class="fa-brands fa-facebook-square"
aria-hidden="true"
></i>
<span class="sr-only">Facebook</span>
</a>
</li>
<li class="list-inline-item">
<a target="_blank" href="https://twitter.com">
<i class="fa fa-twitter" aria-hidden="true"></i>
<span class="sr-only">Twitter</span>
</a>
</li>
<li class="list-inline-item">
<a target="_blank" href="https://www.instagram.com">
<i class="fa fa-instagram" aria-hidden="true"></i>
<span class="sr-only">Instagram</span>
</a>
</li>
</ul>
</div>
<div class="col-sm-6 text-sm-left">
<p class="small">Copyright © 2022 fledgling</p>
</div>
</div>
</div>
</footer>
<!--Bootstrap scripts-->
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF"
crossorigin="anonymous"
></script>
<!--Jquery and my script-->
<script
src="https://code.jquery.com/jquery-3.6.0.js"
integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk="
crossorigin="anonymous"
></script>
<script src="assets/scripts/script.js"></script>
</body>
</html>