generated from Code-Institute-Org/gitpod-full-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
game.html
223 lines (207 loc) · 9.21 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--Bootstrap CDN-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" />
<!--Fontawesome CDN-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" />
<!--Favicon-->
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<!--Link to custom style sheet-->
<link rel="stylesheet" href="assets/css/style.css" type="text/css" />
<title>Physics Code - Game</title>
<meta property="og:url" content="https://pauld0051.github.io/physics-code/index.html" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Physics Code" />
<meta property="og:description" content="A free web resource for Physics students." />
<meta property="og:image" content="https://pauld0051.github.io/physics-code/assets/images/logo-main.png" />
</head>
<body>
<header>
<!-- Logo and text in Navbar-->
<nav class="navbar navbar-expand-custom navbar-light navbar-custom bg-info no-gutters">
<a class="navbar-brand" href="index.html">
<img src="assets/images/logo-main.png" width="30" height="30" class="d-inline-block align-top" alt="Physics Code Logo" loading="lazy">
Physics Code
</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link nav-text" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link nav-text" href="calculator.html">Calculator</a>
</li>
<li class="nav-item">
<a class="nav-link nav-text" href="help.html">Help</a>
</li>
<li class="nav-item active">
<a class="nav-link nav-text" href="game.html">Game <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link nav-text" href="test_yourself.html">Test yourself</a>
</li>
<li class="nav-item">
<a class="nav-link nav-text" href="contact.html">Contact</a>
</li>
</ul>
<span class="navbar-text rightside-navigation-text">
Don't let physics control you - take control of physics!
</span>
</div>
</nav>
</header>
<div class="mb-1"></div>
<!-- Custom Dialog Box source: https://www.developphp.com/video/JavaScript/Custom-Alert-Box-Programming-Tutorial -->
<div id="dialogoverlay"></div>
<div id="dialogbox">
<div>
<div id="dialogboxhead"></div>
<div id="dialogboxbody"></div>
<div id="dialogboxfoot"></div>
</div>
</div>
<!-- End Custom Dialog Box -->
<section class="container">
<div class="row">
<div class="col-12 title-div">
<div class="container heading-background heading-padding heading-margin-top">
<h1>Reaction Time Game <i class="fas fa-gamepad"></i></h1>
<p class="head-text">If you're wanting to test your reaction time for the calculator, you can do so here by playing this game. Just try to hit the
brakes when the light turns red.</p>
<p class="head-text">Because we're dealing with reaction times between the pedals in a car, this test done by mouse or touch screen may not give an
accurate representation of reaction time. This game tests your reaction time as an estimate only.</p>
<p class="head-text my-0">Reaction times will vary with age, tiredness, distractions, impairment with alcohol or drugs and many other reasons.</p>
</div>
</div>
</div>
</section>
<section class="container">
<div class="row">
<div class="col-12 title-div">
<div class="container heading-background heading-padding heading-margin">
<h2>Test your reaction time!</h2>
<p class="card-text">
Click the "start" button to turn the lamp green. Wait until the lamp turns red and the brake button appears and try and click the brakes as fast as you can.
</p>
</div>
</div>
</div>
</section>
<div class="container">
<div class="row">
<div class="col-lg-3 content-div">
</div>
<!-- Reaction Time Game Card-->
<div class="col-lg-6 content-div">
<div class="card game-card shadow">
<div class="container text-center">
<span id="redLightStart" class="red_light_icon"><br><i class="fas fa-lightbulb fa-7x"></i></span>
<span id="greenLightStop" class="icon_hide_greenLight green_light_icon"><br><i class="fas fa-lightbulb fa-7x"></i></span>
</div>
<div class="card-body">
<h5 class="card-title heading-center" id="remove_start">Push the Start button
</h5>
<h5 class="card-title heading-center remove_start" id="ready_to_brake">Get ready to brake!</h5>
<br>
<div class="container text-center">
<button class="btn btn-danger btn-lg btn--padding" id="start_button">Start</button>
<button type="submit" class="btn btn-danger btn-lg btn_hide_brakes" id="brake_button">Brakes</button>
</div>
</div>
</div>
</div>
<div class="col-lg-3 content-div">
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="reaction_time_output" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="reaction_time_header">Your Reaction Time...</h5><i class="fas fa-stopwatch fa-2x"></i>
</div>
<div class="modal-body">
<p class="reaction_time_text" id="time"></p><br><br>
<p class="best_score_text" id="best_score"></p>
</div>
<div class="modal-footer">
<button type="button" id="share_button" class="btn fb--button"><i class="fab fa-facebook-f fa-lg mr-2"></i>Share</button>
<button type="button" id="restart_test" class="btn btn-secondary" data-dismiss="modal">Reset</button>
</div>
</div>
</div>
</div>
<div class="mb-1"></div>
<!-- Footer -->
<footer class="page-footer font-small darken-3">
<!-- Footer Elements -->
<div class="container">
<!-- Grid row-->
<div class="row">
<!-- Grid column -->
<div class="col-md-12 py-5">
<div class="mb-5 text-center">
<!-- Facebook -->
<a class="fb-icon" href="https://www.facebook.com" target="_blank">
<i class="fab fa-facebook-f fa-lg mr-md-5 mr-3 fa-2x"></i>
</a>
<!-- Twitter -->
<a class="tw-icon" href="https://www.twitter.com" target="_blank">
<i class="fab fa-twitter fa-lg mr-md-5 mr-3 fa-2x"></i>
</a>
<!--Linkedin -->
<a class="li-icon" href="https://www.linkedin.com" target="_blank">
<i class="fab fa-linkedin-in fa-lg mr-md-5 mr-3 fa-2x"></i>
</a>
<!--Instagram-->
<a class="ins-icon" href="https://www.instagram.com" target="_blank">
<i class="fab fa-instagram fa-lg mr-md-5 mr-3 fa-2x"></i>
</a>
<!--Pinterest-->
<a class="pin-icon" href="https://www.pintrest.com" target="_blank">
<i class="fab fa-pinterest fa-lg fa-2x"></i>
</a>
</div>
</div>
<!-- Grid column -->
</div>
<!-- Grid row-->
</div>
<!-- Footer Elements -->
<!-- Copyright and Facebook share -->
<div class="container text-center">
<div class="fb-share-button" data-href="https://pauld0051.github.io/physics-code/index.html" data-layout="button" data-size="large">
<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fpauld0051.github.io%2Fphysics-code%2Findex.html&src=sdkpreparse"
class="fb-xfbml-parse-ignore">Share</a></div>
</div>
<div class="footer-copyright text-center py-3">© 2020 Copyright:
<a href="index.html">Physics Code</a><br>
<a href="privacy.html" target="_blank">Privacy Policy</a><br>
<a href="terms.html" target="_blank">Terms and Conditions</a>
</div>
<!-- Copyright -->
</footer>
<!-- Footer -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="assets/scripts/game.js"></script>
<script src="assets/scripts/dependencies.js"></script>
<div id="fb-root"></div>
<script src="https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v8.0&appId=335490644461179&autoLogAppEvents=1" nonce="HYRkFRRQ"></script>
</body>
</html>