-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
303 lines (284 loc) · 11.4 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
<!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" />
<!-- CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
<title>Life Simulator</title>
</head>
<body>
<div id="background"></div>
<!-- Navbar -->
<nav class="navbar navbar-expand-md navbar-dark">
<div id="nav-buttons" class="container-fluid">
<a class="navbar-brand">Life Simulator</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-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 me-auto mb-2 mb-md-0">
<li class="nav-item">
<a class="nav-link active" href="">Play</a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="about" href="about.html">About</a>
</li>
</ul>
<div class="d-flex">
<a class="me-2" href="https://github.com/arraysius/lifesimulator" target="_blank">
<img src="images/GitHub-Mark-Light-32px.png" alt="GitHub">
</a>
</div>
</div>
</div>
</nav>
<!-- App -->
<div id="app">
<!-- Agreement Modal -->
<div class="modal fade" ref="agreementModal" id="agreementModal" data-bs-backdrop="false" data-bs-keyboard="false"
tabindex="-1" aria-labelledby="agreementModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="agreementModalLabel">
Rules of the Game
</h5>
</div>
<div class="modal-body">
<p>Welcome to <em>Life Simulator</em>!</p>
<p>
You will be presented with {{ questions.length - 1 }} scenarios.
Select the options as to how you think you would in your own
life and try to achieve a high score!
</p>
<p>
By playing <em>Life Simulator</em>, I agree to the following:
</p>
<ol>
<li>I will not challenge the provided choices</li>
<li>I accept the scores attributed to the choices</li>
<li>
I will not raise disputes with the creator of
<em>Life Simulator</em>
</li>
<li>I will accept the final score</li>
</ol>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">
Agree
</button>
</div>
</div>
</div>
</div>
<!-- Finish Modal -->
<div class="modal fade" id="finishModal" data-bs-backdrop="false" data-bs-keyboard="false" tabindex="-1"
aria-labelledby="finishModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="finishModalLabel">Life Completed!</h5>
</div>
<div class="modal-body">
<!-- Final score -->
<h4>Your final score: <strong>{{ score }}</strong></h4>
<br />
<!-- Score comment table -->
<table id="score-comment-table" class="table table-striped">
<colgroup>
<col span="1" />
<col span="1" />
</colgroup>
<thead>
<tr>
<th class="text-center">Score</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">50</td>
<td>
Well done! You are a model citizen and everybody else
should follow in your footsteps.
</td>
</tr>
<tr>
<td class="text-center">30 to 49</td>
<td>
You made many good choices and led a great life!
Reconsider certain choices so that you can become a model
citizen.
</td>
</tr>
<tr>
<td class="text-center">1 to 29</td>
<td>
You have led a decent life. However there is still room
for improvement.
</td>
</tr>
<tr>
<td class="text-center">0</td>
<td>
Either your good choices have offset your bad ones, or you
have chosen a neutral position throughout your life. It is
highly recommended to select the good choices and work
towards being a model citizen.
</td>
</tr>
<tr>
<td class="text-center">-1 to -29</td>
<td>
You have made more bad choices than good ones in your
life. Continuing down this path will lead to poor quality
of life.
</td>
</tr>
<tr>
<td class="text-center">-30 to -49</td>
<td>
You have made many more bad choices than good ones
thorughout your life. You are an imperfect citizen and
will face many obstacles if you do not make better
choices.
</td>
</tr>
<tr>
<td class="text-center">-50</td>
<td>
How could this have happened? You have constantly made bad
choices throughout your life. You are an inferor citizen
and will not be accepted by society.
</td>
</tr>
</tbody>
</table>
<hr />
<h4>Unlocking the neutral choice</h4>
<p>
You may have noticed that the neutral choice (+0) is locked. It
is entirely possible to unlock and select the neutral choice,
however it is not recommended.
</p>
<p>
Unlocking the neutral choice requires you to have knowledge about front end web development. Here are some
resources to guide you if you choose to unlock the neutral choice:
</p>
<ol>
<li>
<a href="https://en.wikipedia.org/wiki/Front-end_web_development"
target="_blank">https://en.wikipedia.org/wiki/Front-end_web_development</a>
</li>
<li>
<a href="https://www.codecademy.com/catalog/language/html-css" target="_blank">
https://www.codecademy.com/catalog/language/html-css
</a>
</li>
<li>
<a href="https://www.w3schools.com/html/" target="_blank">
https://www.w3schools.com/html/
</a>
</li>
<li>
<a href="https://www.w3schools.com/css/" target="_blank">https://www.w3schools.com/css/</a>
</li>
<li>
<a href="https://www.w3schools.com/js/" target="_blank">https://www.w3schools.com/js/</a>
</li>
<li>
<a href="https://getbootstrap.com/" target="_blank">https://getbootstrap.com/</a>
</li>
<li>
<a href="https://v3.vuejs.org/guide/introduction.html"
target="_blank">https://v3.vuejs.org/guide/introduction.html</a>
</li>
<li>
<a href="https://developer.chrome.com/docs/devtools/"
target="_blank">https://developer.chrome.com/docs/devtools/</a>
</li>
<li>
<a href="https://developer.mozilla.org/en-US/docs/Tools"
target="_blank">https://developer.mozilla.org/en-US/docs/Tools</a>
</li>
<li>
<a href="https://developer.apple.com/safari/tools/"
target="_blank">https://developer.apple.com/safari/tools/</a>
</li>
</ol>
</div>
<div class="modal-footer">
<a href="about.html" class="btn btn-secondary">About</a>
<a href="" type="button" class="btn btn-primary">Play Again</a>
</div>
</div>
</div>
</div>
<!-- Card -->
<div id="question-card" class="card">
<div class="card-body">
<div class="container">
<!-- Neutral choice switch -->
<div id="neutral-choice-switch-form" class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault" v-model="neutralLocked"
disabled />
<label class="form-check-label" for="flexSwitchCheckDefault">
Neutral choice {{ neutralLocked ? "locked" : "unlocked" }}
</label>
</div>
<!-- Score -->
<h1 class="card-title pre-button">Score: {{ score }}</h1>
<!-- Question -->
<h2 class="card-text pre-button">
{{ questions[questionNum].question }}
</h2>
<h4 class="card-text pre-button">Do you:</h4>
<!-- Buttons -->
<div class="row">
<div class="col-sm-4">
<button class="btn btn-lg btn-danger choice-button" @click="updateScore(-5)">
{{ questions[questionNum].options.bad }}
<br />
(-5)
</button>
</div>
<div class="col-sm-4">
<button class="btn btn-lg btn-primary choice-button" @click="updateScore(0)" :disabled="neutralLocked">
{{ questions[questionNum].options.neutral }}
<br />
(+0)
</button>
</div>
<div class="col-sm-4">
<button class="btn btn-lg btn-success choice-button" @click="updateScore(+5)">
{{ questions[questionNum].options.good }}
<br />
(+5)
</button>
</div>
</div>
<!-- Progress bar -->
<div id="progress-bar" class="progress">
<div class="progress-bar" role="progressbar" :style="{ width: progress + '%' }" :aria-valuenow="progress"
aria-valuemin="0" aria-valuemax="100">
{{ questionNum }} / {{ questions.length - 1 }} Answered
</div>
</div>
</div>
</div>
</div>
<!-- Scripts -->
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/vue.global.prod.js"></script>
<script src="app.js"></script>
<!-- Animated background scripts -->
<script src="js/three.r119.min.js"></script>
<script src="js/vanta.net.min.js"></script>
<script src="js/load_vanta.js"></script>
</body>
</html>