FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
code-invaders/index.html at main · techwithmack/code-invaders · GitHub
techwithmack
/
code-invaders
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
code-invaders
/
index.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
197 lines (183 loc) · 8.85 KB
Breadcrumbs
code-invaders
/
index.html
Copy path
File metadata and controls
197 lines (183 loc) · 8.85 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<!DOCTYPE html
>
<
html
lang
="
en
"
>
<
head
>
<
meta
charset
="
UTF-8
"
>
<
meta
name
="
viewport
"
content
="
width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no
"
>
<
meta
name
="
mobile-web-app-capable
"
content
="
yes
"
>
<
title
>
Code Invaders - Secure Coding Training Game
</
title
>
<
link
rel
="
stylesheet
"
href
="
styles.css
"
>
</
head
>
<
body
>
<
div
class
="
container
"
>
<
header
>
<
h1
>
CODE INVADERS
</
h1
>
<
p
class
="
subtitle
"
>
Defend Against Vulnerable Code!
</
p
>
<
button
id
="
howToPlayBtn
"
class
="
how-to-play-btn
"
title
="
How to Play
"
>
?
</
button
>
</
header
>
<
div
class
="
game-wrapper
"
>
<
div
class
="
hud
"
>
<
div
class
="
hud-item
"
>
<
span
class
="
hud-label
"
>
SCORE:
</
span
>
<
span
id
="
score
"
class
="
hud-value
"
>
0
</
span
>
</
div
>
<
div
class
="
hud-item
"
>
<
span
class
="
hud-label
"
>
LEVEL:
</
span
>
<
span
id
="
level
"
class
="
hud-value
"
>
1
</
span
>
</
div
>
<
div
class
="
hud-item
"
>
<
span
class
="
hud-label
"
>
STREAK:
</
span
>
<
span
id
="
streak
"
class
="
hud-value
"
>
0
</
span
>
</
div
>
<
div
class
="
hud-item
"
>
<
span
class
="
hud-label
"
>
ACCURACY:
</
span
>
<
span
id
="
accuracy
"
class
="
hud-value
"
>
--%
</
span
>
</
div
>
</
div
>
<
canvas
id
="
gameCanvas
"
>
</
canvas
>
<
div
class
="
stats
"
>
<
div
class
="
stat-row
"
>
<
div
class
="
stat-item destroyed
"
>
<
span
class
="
stat-icon
"
>
💥
</
span
>
<
span
class
="
stat-label
"
>
Secure Destroyed:
</
span
>
<
span
id
="
secure-destroyed
"
class
="
stat-value
"
>
0
</
span
>
</
div
>
<
div
class
="
stat-item insecure
"
>
<
span
class
="
stat-icon
"
>
⚠
</
span
>
<
span
class
="
stat-label
"
>
Vulns Destroyed:
</
span
>
<
span
id
="
insecure-hits
"
class
="
stat-value
"
>
0
</
span
>
</
div
>
<
div
class
="
stat-item malware
"
>
<
span
class
="
stat-icon
"
>
☠
</
span
>
<
span
class
="
stat-label
"
>
Malware Destroyed:
</
span
>
<
span
id
="
malware-hits
"
class
="
stat-value
"
>
0
</
span
>
</
div
>
</
div
>
<
div
class
="
stat-row
"
>
<
div
class
="
stat-item secure-good
"
>
<
span
class
="
stat-icon
"
>
✅
</
span
>
<
span
class
="
stat-label
"
>
Secure Passed:
</
span
>
<
span
id
="
secure-passed
"
class
="
stat-value
"
>
0
</
span
>
</
div
>
<
div
class
="
stat-item insecure-missed
"
>
<
span
class
="
stat-icon
"
>
⛔
</
span
>
<
span
class
="
stat-label
"
>
Vulns Missed:
</
span
>
<
span
id
="
insecure-missed
"
class
="
stat-value
"
>
0
</
span
>
</
div
>
<
div
class
="
stat-item malware-missed
"
>
<
span
class
="
stat-icon
"
>
🚨
</
span
>
<
span
class
="
stat-label
"
>
Malware Missed:
</
span
>
<
span
id
="
malware-missed
"
class
="
stat-value
"
>
0
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
="
controls
"
>
<
div
class
="
control-group desktop-only
"
>
<
span
class
="
key
"
>
← →
</
span
>
or
<
span
class
="
key
"
>
A D
</
span
>
Move
</
div
>
<
div
class
="
control-group desktop-only
"
>
<
span
class
="
key
"
>
SPACE
</
span
>
Shoot
</
div
>
<
div
class
="
control-group mobile-only
"
>
<
span
class
="
key
"
>
TAP
</
span
>
Shoot
</
div
>
<
div
class
="
control-group mobile-only
"
>
<
span
class
="
key
"
>
DRAG
</
span
>
Move
</
div
>
<
div
class
="
control-group
"
>
<
span
class
="
key
"
>
CLICK CODE
</
span
>
View Full
</
div
>
<
div
class
="
control-group
"
>
<
span
class
="
key
"
>
P
</
span
>
Pause
</
div
>
<
div
class
="
control-group
"
>
<
span
class
="
key
"
>
E
</
span
>
End & Review
</
div
>
<
div
class
="
control-group
"
>
<
span
class
="
key
"
>
R
</
span
>
Restart
</
div
>
</
div
>
<
div
class
="
end-game-container
"
>
<
button
id
="
endGameButton
"
class
="
end-game-button
"
>
⏹ End Game & Review
</
button
>
</
div
>
<
div
id
="
gameOverlay
"
class
="
overlay hidden
"
>
<
div
class
="
overlay-content
"
>
<
h2
id
="
overlayTitle
"
>
GAME PAUSED
</
h2
>
<
button
id
="
restartButton
"
class
="
restart-button hidden
"
>
🔄 Restart Game
</
button
>
<
p
id
="
overlayMessage
"
>
Press P to continue
</
p
>
<
div
id
="
finalStats
"
class
="
final-stats
"
>
</
div
>
</
div
>
</
div
>
<
div
id
="
codeModal
"
class
="
overlay hidden
"
>
<
div
class
="
code-modal-content
"
>
<
div
class
="
code-modal-header
"
>
<
h3
id
="
codeModalLanguage
"
>
</
h3
>
<
button
id
="
closeCodeModal
"
class
="
close-button
"
>
✕
</
button
>
</
div
>
<
div
id
="
codeModalBody
"
class
="
code-modal-body
"
>
</
div
>
<
div
class
="
code-modal-footer
"
>
<
p
>
Click outside or press ESC to close
</
p
>
</
div
>
</
div
>
</
div
>
<
div
id
="
howToPlayModal
"
class
="
overlay hidden
"
>
<
div
class
="
how-to-play-content
"
>
<
div
class
="
code-modal-header
"
>
<
h3
>
How to Play
</
h3
>
<
button
id
="
closeHowToPlay
"
class
="
close-button
"
>
✕
</
button
>
</
div
>
<
div
class
="
how-to-play-body
"
>
<
section
>
<
h4
>
🎯 Objective
</
h4
>
<
p
>
Destroy vulnerable code and malware while letting secure code pass through safely!
</
p
>
</
section
>
<
section
>
<
h4
>
🎮 Controls
</
h4
>
<
ul
>
<
li
>
<
strong
>
Desktop:
</
strong
>
Arrow keys or A/D to move, SPACE to shoot
</
li
>
<
li
>
<
strong
>
Mobile:
</
strong
>
Drag to move, tap to shoot
</
li
>
<
li
>
<
strong
>
View Code:
</
strong
>
Click/tap any code block to view the full code
</
li
>
</
ul
>
</
section
>
<
section
>
<
h4
>
📊 Code Types
</
h4
>
<
ul
>
<
li
>
<
strong
>
Secure Code:
</
strong
>
Let it pass! Don't shoot it.
</
li
>
<
li
>
<
strong
>
Vulnerable Code (⚠):
</
strong
>
Shoot it before it reaches the bottom!
</
li
>
<
li
>
<
strong
>
Malware (☠):
</
strong
>
Very dangerous! Shoot it immediately!
</
li
>
</
ul
>
</
section
>
<
section
>
<
h4
>
💯 Scoring
</
h4
>
<
ul
>
<
li
>
Destroy Vulnerable Code:
<
span
class
="
score-positive
"
>
+10 points
</
span
>
</
li
>
<
li
>
Destroy Malware:
<
span
class
="
score-positive
"
>
+25 points
</
span
>
</
li
>
<
li
>
Shoot Secure Code:
<
span
class
="
score-negative
"
>
-15 points
</
span
>
</
li
>
<
li
>
Miss Vulnerable Code:
<
span
class
="
score-negative
"
>
-20 points
</
span
>
</
li
>
<
li
>
Miss Malware:
<
span
class
="
score-negative
"
>
-40 points
</
span
>
</
li
>
<
li
>
Let Secure Code Pass:
<
span
class
="
score-positive
"
>
+2 points
</
span
>
</
li
>
</
ul
>
</
section
>
<
section
>
<
h4
>
🚨 Game Over Conditions
</
h4
>
<
ul
>
<
li
>
Shoot 15 secure code blocks
</
li
>
<
li
>
Miss 10 vulnerabilities/malware combined
</
li
>
</
ul
>
</
section
>
<
section
>
<
h4
>
💡 Pro Tips
</
h4
>
<
ul
>
<
li
>
Click on code blocks to read them better - the game keeps running!
</
li
>
<
li
>
Build streaks by destroying multiple threats in a row for bonus points
</
li
>
<
li
>
The game gets faster and harder as you progress
</
li
>
<
li
>
Press 'E' to end early and review your mistakes
</
li
>
</
ul
>
</
section
>
</
div
>
</
div
>
</
div
>
</
div
>
<
script
src
="
dist/main.js
"
>
</
script
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL