Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
179 lines (179 loc) · 20.5 KB
/
Copy pathindex.html
File metadata and controls
179 lines (179 loc) · 20.5 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>Code is Fun</title>
<meta name="description" content="Games to learn to think like a programmer: Turtle Quest (programming a turtle in BASIC), Circuits (logic gates), Drako! (a cartoon snake), Briko Boom! (a cartoon brick breaker), Cosmo Zap! (a cartoon Space Invaders) and Zoomo! (a cartoon anti-gravity racer).">
<meta name="theme-color" content="#FFFDF8">
<link rel="icon" href="shared/turtle.svg" type="image/svg+xml">
<link rel="stylesheet" href="shared/site.css">
</head>
<body>
<header class="top">
<a class="brand" href="./"><svg viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="9" fill="#2F7F93"/><path d="M9 11l-4 5 4 5M23 11l4 5-4 5M18 8l-4 16" stroke="#fff" stroke-width="2.6" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg><span style="display:inline">Code is Fun</span></a>
<div class="spacer"></div>
<div class="lang" role="group" aria-label="Language / Langue"><button type="button" data-lang="fr">FR</button><button type="button" data-lang="en">EN</button></div>
</header>
<main class="home">
<section class="hero">
<h1>Code is Fun</h1>
<p data-en="Learn to think like a programmer." data-fr="Apprends à penser comme un programmeur.">Learn to think like a programmer.</p>
</section>
<section class="games">
<a class="panel game-card" href="turtle/">
<svg class="thumb" viewBox="0 0 320 200" aria-hidden="true">
<rect width="320" height="200" fill="#8CC96B"/>
<g fill="#7A8696"><rect x="30" y="40" width="36" height="36" rx="5"/><rect x="70" y="40" width="36" height="36" rx="5"/><rect x="110" y="40" width="36" height="36" rx="5"/><rect x="150" y="40" width="36" height="36" rx="5"/><rect x="190" y="40" width="36" height="36" rx="5"/><rect x="230" y="40" width="36" height="36" rx="5"/><rect x="30" y="80" width="36" height="36" rx="5"/><rect x="230" y="80" width="36" height="36" rx="5"/><rect x="30" y="120" width="36" height="36" rx="5"/><rect x="70" y="120" width="36" height="36" rx="5"/><rect x="110" y="120" width="36" height="36" rx="5"/><rect x="150" y="120" width="36" height="36" rx="5"/><rect x="190" y="120" width="36" height="36" rx="5"/><rect x="230" y="120" width="36" height="36" rx="5"/></g>
<rect x="68" y="78" width="160" height="40" fill="#F4EBCD"/>
<path d="M88 98H170" stroke="#7FA0D0" stroke-width="5" stroke-linecap="round"/>
<g transform="translate(180 98) rotate(90)"><circle cx="-8" cy="-8" r="4" fill="#6FB86A"/><circle cx="8" cy="-8" r="4" fill="#6FB86A"/><circle cx="-8" cy="8" r="4" fill="#6FB86A"/><circle cx="8" cy="8" r="4" fill="#6FB86A"/><circle cx="0" cy="-15" r="5" fill="#7CC576"/><circle r="12" fill="#2F7A35"/><circle r="9" fill="#4FA052"/></g>
<path d="M210 85v26" stroke="#5A4632" stroke-width="2"/><path d="M210 85l16 5-16 5z" fill="#E0483E"/>
<text x="160" y="186" text-anchor="middle" font-family="ui-monospace,Menlo,monospace" font-weight="700" font-size="15" fill="#1F55B8">REPEAT 4 · FORWARD 2 · RIGHT</text>
</svg>
<div class="body">
<h2>Turtle Quest</h2>
<p data-en="Write BASIC programs that guide a turtle: loops, conditions, variables, your own words, fractals. In English or in French. And a free mode: a whole computer, its screen, keyboard and sound — Arkanoid included." data-fr="Écris des programmes en BASIC qui guident une tortue : boucles, conditions, variables, tes propres mots, fractales. En anglais ou en français. Et un mode libre : tout un ordinateur, son écran, son clavier, son son — Arkanoid compris.">Write BASIC programs that guide a turtle.</p>
<div class="row"><span class="progress" id="tqProgress"></span><span class="btn primary" data-en="Play" data-fr="Jouer">Play</span></div>
</div>
</a>
<a class="panel game-card" href="circuits/">
<svg class="thumb" viewBox="0 0 320 200" aria-hidden="true">
<rect width="320" height="200" fill="#EEF3EF"/><rect width="56" height="200" fill="#E2EAE4"/><rect x="264" width="56" height="200" fill="#E2EAE4"/>
<rect x="18" y="56" width="26" height="22" rx="5" fill="#21A346"/><text x="31" y="72" text-anchor="middle" font-weight="700" font-size="14" fill="#fff" font-family="system-ui,sans-serif">1</text>
<rect x="18" y="122" width="26" height="22" rx="5" fill="#F7F4EE" stroke="#B9B2A4"/><text x="31" y="138" text-anchor="middle" font-weight="700" font-size="14" fill="#2B2A26" font-family="system-ui,sans-serif">0</text>
<path d="M44 67H100V86H130M44 133H100V114H130" fill="none" stroke-width="4" stroke-linejoin="round" stroke="#21A346"/><path d="M44 133H100V114H130" fill="none" stroke-width="3.5" stroke-linejoin="round" stroke="#334A5E"/>
<path d="M128 74Q160 74 182 100Q160 126 128 126Q140 100 128 74Z" fill="#E3F5E7" stroke="#2B3440" stroke-width="3"/><path d="M120 126Q132 100 120 74" fill="none" stroke="#2B3440" stroke-width="3"/>
<path d="M182 100H262" stroke="#21A346" stroke-width="4"/>
<circle cx="280" cy="100" r="16" fill="#FFD23F" opacity=".35"/><circle cx="280" cy="100" r="11" fill="#FFD23F" stroke="#C99A12" stroke-width="2"/>
<text x="155" y="104" text-anchor="middle" font-size="12" fill="#4A5560" font-family="system-ui,sans-serif" font-weight="600">XOR</text>
</svg>
<div class="body">
<h2>Circuits</h2>
<p data-en="How does a computer compute? Wire logic gates — NOT, AND, OR, XOR... — until the lamps match the truth table, up to a two-bit adder." data-fr="Comment un ordinateur calcule-t-il ? Relie des portes logiques — NON, ET, OU, OUX... — jusqu'à ce que les lampes suivent la table de vérité, jusqu'à un additionneur.">Wire logic gates until the lamps match the truth table.</p>
<div class="row"><span class="progress" id="ciProgress"></span><span class="btn primary" data-en="Play" data-fr="Jouer">Play</span></div>
</div>
</a>
<a class="panel game-card" href="snake/">
<svg class="thumb" viewBox="0 0 320 200" aria-hidden="true" font-family="Arial Black,Impact,sans-serif">
<defs><pattern id="dkck" width="40" height="40" patternUnits="userSpaceOnUse"><rect width="40" height="40" fill="#7CC242"/><rect width="20" height="20" fill="#71B53A"/><rect x="20" y="20" width="20" height="20" fill="#71B53A"/></pattern>
<linearGradient id="dkgd" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#FFF09A"/><stop offset=".5" stop-color="#FFCC2E"/><stop offset="1" stop-color="#D8930F"/></linearGradient></defs>
<rect width="320" height="200" fill="#9AA3AD"/>
<rect x="12" y="12" width="296" height="176" rx="10" fill="url(#dkck)" stroke="#2A1A0E" stroke-width="3"/>
<path d="M40 150 C80 150 80 110 120 110 S170 150 205 135" fill="none" stroke="#2A1A0E" stroke-width="30" stroke-linecap="round"/>
<path d="M40 150 C80 150 80 110 120 110 S170 150 205 135" fill="none" stroke="#4CC94A" stroke-width="22" stroke-linecap="round"/>
<path d="M40 150 C80 150 80 110 120 110 S170 150 205 135" fill="none" stroke="#D8F27A" stroke-width="6" stroke-linecap="round" transform="translate(0,5)" opacity=".8"/>
<g transform="translate(220 130)" stroke="#2A1A0E" stroke-width="3"><path d="M-8 -14 L-18 -26 L-2 -16Z M-8 14 L-18 26 L-2 16Z" fill="#FFF1C9"/><ellipse rx="22" ry="18" fill="#4CC94A"/><path d="M6 0 L22 -10 L22 10Z" fill="#7A1630"/><circle cx="0" cy="-9" r="7" fill="#fff"/><circle cx="0" cy="9" r="7" fill="#fff"/><circle cx="3" cy="-9" r="3.5" fill="#111" stroke="none"/><circle cx="3" cy="9" r="3.5" fill="#111" stroke="none"/></g>
<g transform="translate(272 128)" stroke="#2A1A0E" stroke-width="3"><circle r="13" fill="#D8930F"/><circle r="10" cy="-1" fill="#FFCC2E" stroke="none"/></g>
<path d="M82 100 q10 -22 0 -30 q-10 8 0 30Z" fill="#E04BD6" stroke="#2A1A0E" stroke-width="3"/>
<text x="160" y="66" text-anchor="middle" font-size="48" font-weight="900" fill="#2A1A0E" stroke="#2A1A0E" stroke-width="10" stroke-linejoin="round" dy="4">DRAKO!</text>
<text x="160" y="66" text-anchor="middle" font-size="48" font-weight="900" fill="url(#dkgd)" stroke="#2A1A0E" stroke-width="3" paint-order="stroke">DRAKO!</text>
</svg>
<div class="body">
<h2>Drako!</h2>
<p data-en="A cartoon snake: steer Drako the baby dragon, gobble the village gold back from the goblins. Five villages and an endless mode — swipe on a phone, arrows on a computer." data-fr="Un snake façon dessin animé : guide Drako le bébé dragon, reprends l'or du village aux gobelins. Cinq villages et un mode sans fin — glisse sur un téléphone, flèches sur un ordinateur.">A cartoon snake: steer Drako the baby dragon.</p>
<div class="row"><span class="progress" id="dkProgress"></span><span class="btn primary" data-en="Play" data-fr="Jouer">Play</span></div>
</div>
</a>
<a class="panel game-card" href="brick/">
<svg class="thumb" viewBox="0 0 320 200" aria-hidden="true" font-family="system-ui,sans-serif">
<defs><linearGradient id="bksky" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#FFD6E8"/><stop offset="1" stop-color="#FFF4D6"/></linearGradient></defs>
<rect width="320" height="200" fill="url(#bksky)"/>
<g stroke="#2B2340" stroke-width="2.5" stroke-linejoin="round">
<rect x="40" y="22" width="38" height="18" rx="5" fill="#FF5A5F"/><rect x="81" y="22" width="38" height="18" rx="5" fill="#FF9F1C"/><rect x="122" y="22" width="38" height="18" rx="5" fill="#FFD23F"/><rect x="163" y="22" width="38" height="18" rx="5" fill="#3DD68C"/><rect x="204" y="22" width="38" height="18" rx="5" fill="#3FA7FF"/><rect x="245" y="22" width="38" height="18" rx="5" fill="#A66CFF"/>
<rect x="60" y="43" width="38" height="18" rx="5" fill="#8C9BFF"/><rect x="101" y="43" width="38" height="18" rx="5" fill="#B8C2CC"/><rect x="183" y="43" width="38" height="18" rx="5" fill="#4FD1C5"/><rect x="224" y="43" width="38" height="18" rx="5" fill="#FFC83D"/>
<rect x="142" y="43" width="38" height="18" rx="5" fill="#FF3D3D"/>
</g>
<path d="M150 50l8 -14 4 12 12 -10 -2 14 14 2 -12 8 10 10 -14 -2 -2 14 -8 -12 -10 10 0 -14 -14 -4 12 -6z" fill="#FFD23F" stroke="#2B2340" stroke-width="2.5" stroke-linejoin="round" transform="translate(4 6)"/>
<g transform="translate(262 84)" stroke="#2B2340" stroke-width="2.5"><circle cx="-14" cy="12" r="8" fill="#fff" opacity=".5" stroke="none"/><circle cx="-26" cy="22" r="6" fill="#fff" opacity=".3" stroke="none"/><circle r="10" fill="#FFFDF8"/><circle cx="3" cy="-3" r="1.8" fill="#2B2340" stroke="none"/><circle cx="-2" cy="2" r="1.8" fill="#2B2340" stroke="none"/></g>
<g stroke="#2B2340" stroke-width="3"><rect x="120" y="162" width="84" height="20" rx="10" fill="#2F7F93"/><path d="M133 162v20M191 162v20" stroke-width="2"/></g>
<g fill="#FF9F1C" stroke="#2B2340" stroke-width="3"><path d="M130 162h3v20h-3a10 10 0 0 1 0-20z"/><path d="M194 162h-3v20h3a10 10 0 0 0 0-20z"/></g>
<g stroke="#2B2340" stroke-width="1.5"><circle cx="152" cy="171" r="4.5" fill="#fff"/><circle cx="172" cy="171" r="4.5" fill="#fff"/></g><circle cx="153" cy="170" r="2.2" fill="#2B2340"/><circle cx="173" cy="170" r="2.2" fill="#2B2340"/>
<text x="98" y="134" text-anchor="middle" font-size="38" font-weight="900" fill="#2F7F93" stroke="#2B2340" stroke-width="7" paint-order="stroke" stroke-linejoin="round" transform="rotate(-4 98 120)">BRIKO</text>
<text x="236" y="138" text-anchor="middle" font-size="38" font-weight="900" fill="#FF9F1C" stroke="#2B2340" stroke-width="7" paint-order="stroke" stroke-linejoin="round" transform="rotate(-8 236 124)">BOOM!</text>
</svg>
<div class="body">
<h2>Briko Boom!</h2>
<p data-en="A cartoon brick breaker: 12 levels in Candy Land, the Ocean and Space — explosive bricks, multi-ball, laser, fireball. Mouse, keyboard, or a finger on a phone." data-fr="Un casse-briques façon dessin animé : 12 niveaux au Pays des Bonbons, dans l'Océan et dans l'Espace — briques explosives, multi-balles, laser, boule de feu. Souris, clavier, ou un doigt sur un téléphone.">A cartoon brick breaker: 12 levels.</p>
<div class="row"><span class="progress" id="bkProgress"></span><span class="btn primary" data-en="Play" data-fr="Jouer">Play</span></div>
</div>
</a>
<a class="panel game-card" href="race/">
<svg class="thumb" viewBox="0 0 320 200" aria-hidden="true" font-family="system-ui,sans-serif">
<defs><linearGradient id="zmsky" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#4FB4F5"/><stop offset="1" stop-color="#CFF1FF"/></linearGradient></defs>
<rect width="320" height="200" fill="url(#zmsky)"/>
<path d="M0 110 Q60 88 120 104 T240 98 T320 104 V200 H0Z" fill="#7CCB4E" stroke="#2B2340" stroke-width="2.5"/>
<g stroke="#2B2340" stroke-width="2.5" stroke-linejoin="round"><circle cx="270" cy="40" r="18" fill="#FFD23F"/><path d="M30 60a10 10 0 0 1 18-6a12 12 0 0 1 22 4a8 8 0 0 1 2 16h-40a8 8 0 0 1-2-14z" fill="#fff"/></g>
<circle cx="264" cy="37" r="2" fill="#2B2340"/><circle cx="276" cy="37" r="2" fill="#2B2340"/><path d="M263 45q7 5 14 0" stroke="#2B2340" stroke-width="2" fill="none"/>
<path d="M70 200 L150 104 L170 104 L250 200Z" fill="#9B86E6" stroke="#2B2340" stroke-width="3" stroke-linejoin="round"/>
<path d="M70 200 L150 104 L156 104 L88 200Z M250 200 L170 104 L164 104 L232 200Z" fill="#FF4F8E"/>
<g fill="none" stroke-width="7"><path d="M118 104 a42 42 0 0 1 84 0" stroke="#FF5A5F"/><path d="M125 104 a35 35 0 0 1 70 0" stroke="#FFD23F"/><path d="M132 104 a28 28 0 0 1 56 0" stroke="#3DD68C"/><path d="M139 104 a21 21 0 0 1 42 0" stroke="#3FA7FF"/></g>
<g transform="translate(160 160)" stroke="#2B2340" stroke-width="3" stroke-linejoin="round">
<path d="M-52 -2 L-26 -16 L-26 8Z M52 -2 L26 -16 L26 8Z" fill="#FF4F4F"/>
<circle cy="-20" r="17" fill="#BDEBFF"/><circle cy="-24" r="10" fill="#7CD67A"/>
<rect x="-36" y="-12" width="72" height="26" rx="13" fill="#2E7BFF"/><rect x="-5" y="-12" width="10" height="26" fill="#FF4F4F"/>
<circle cx="-17" cy="2" r="7" fill="#DDE6F5"/><circle cx="17" cy="2" r="7" fill="#DDE6F5"/>
</g>
<path d="M150 134 h20" stroke="#E8383F" stroke-width="4" stroke-linecap="round"/>
<text x="86" y="58" text-anchor="middle" font-size="32" font-weight="900" fill="#FF9F1C" stroke="#2B2340" stroke-width="7" paint-order="stroke" stroke-linejoin="round" transform="rotate(-6 86 48)">ZOOMO!</text>
</svg>
<div class="body">
<h2>Zoomo!</h2>
<p data-en="A cartoon anti-gravity racer: six pilots in hover pods, four circuits that climb, dive and bank, rockets, gum, bubbles and turbos. Keyboard, gamepad, or a finger on a phone." data-fr="Une course antigravité façon dessin animé : six pilotes dans leurs vaisseaux, quatre circuits qui montent, plongent et penchent, des fusées, du chewing-gum, des bulles et des turbos. Clavier, manette, ou un doigt sur un téléphone.">A cartoon anti-gravity racer.</p>
<div class="row"><span class="progress" id="zmProgress"></span><span class="btn primary" data-en="Play" data-fr="Jouer">Play</span></div>
</div>
</a>
<a class="panel game-card" href="invaders/">
<svg class="thumb" viewBox="0 0 320 200" aria-hidden="true" font-family="system-ui,sans-serif">
<defs><linearGradient id="zpsky" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#2A1B5C"/><stop offset="1" stop-color="#0B0B24"/></linearGradient></defs>
<rect width="320" height="200" fill="url(#zpsky)"/>
<g fill="#fff"><circle cx="20" cy="30" r="1.5"/><circle cx="300" cy="22" r="1.5"/><circle cx="270" cy="120" r="1.2"/><circle cx="40" cy="130" r="1.2"/><circle cx="160" cy="110" r="1"/></g>
<g stroke="#251B3D" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round">
<g transform="translate(70 40)"><path d="M-14 4c-1-22 29-22 28 0 0 4-28 4-28 0z" fill="#B47CFF"/><path d="M-9 6l-2 9M-3 7l-1 9M3 7l1 9M9 6l2 9" stroke-width="4"/><circle cx="-5" cy="-3" r="4" fill="#fff"/><circle cx="5" cy="-3" r="4" fill="#fff"/></g>
<g transform="translate(130 40)"><path d="M-14 4c-1-22 29-22 28 0 0 4-28 4-28 0z" fill="#B47CFF"/><path d="M-9 6l-2 9M-3 7l-1 9M3 7l1 9M9 6l2 9" stroke-width="4"/><circle cx="-5" cy="-3" r="4" fill="#fff"/><circle cx="5" cy="-3" r="4" fill="#fff"/></g>
<g transform="translate(190 40)"><path d="M-14 4c-1-22 29-22 28 0 0 4-28 4-28 0z" fill="#B47CFF"/><path d="M-9 6l-2 9M-3 7l-1 9M3 7l1 9M9 6l2 9" stroke-width="4"/><circle cx="-5" cy="-3" r="4" fill="#fff"/><circle cx="5" cy="-3" r="4" fill="#fff"/></g>
<g transform="translate(250 40)"><path d="M-14 4c-1-22 29-22 28 0 0 4-28 4-28 0z" fill="#B47CFF"/><path d="M-9 6l-2 9M-3 7l-1 9M3 7l1 9M9 6l2 9" stroke-width="4"/><circle cx="-5" cy="-3" r="4" fill="#fff"/><circle cx="5" cy="-3" r="4" fill="#fff"/></g>
<rect x="84" y="70" width="32" height="20" rx="9" fill="#3DD68C"/><rect x="144" y="70" width="32" height="20" rx="9" fill="#3DD68C"/><rect x="204" y="70" width="32" height="20" rx="9" fill="#3DD68C"/>
<path d="M200 150h36v-12l-4-4h-28l-4 4z" fill="#FFD23F"/>
<path d="M60 150h36v-12l-4-4h-28l-4 4z" fill="#FFD23F"/>
<rect x="157" y="104" width="6" height="16" rx="3" fill="#FFF6A8"/>
<path d="M146 170a14 14 0 0 1 28 0z" fill="#BFF3FF"/><rect x="134" y="168" width="52" height="18" rx="9" fill="#2F7F93"/><rect x="156" y="148" width="8" height="12" rx="2" fill="#FF5A5F"/>
</g>
<g fill="#251B3D"><circle cx="66" cy="38" r="2"/><circle cx="76" cy="38" r="2"/><circle cx="126" cy="38" r="2"/><circle cx="136" cy="38" r="2"/><circle cx="186" cy="38" r="2"/><circle cx="196" cy="38" r="2"/><circle cx="246" cy="38" r="2"/><circle cx="256" cy="38" r="2"/></g>
<text x="250" y="186" text-anchor="middle" font-size="30" font-weight="900" fill="#FF7AB6" stroke="#251B3D" stroke-width="6" paint-order="stroke" stroke-linejoin="round" transform="rotate(-8 250 176)">ZAP!</text>
</svg>
<div class="body">
<h2>Cosmo Zap!</h2>
<p data-en="A cartoon Space Invaders: wobbly aliens march down faster and faster — zap them from behind the cheese bunkers, shoot the saucer for capsules. Endless waves; keyboard, mouse, or a finger on a phone." data-fr="Un Space Invaders façon dessin animé : des aliens rigolos descendent de plus en plus vite — zappe-les à l'abri des fromages, tire sur la soucoupe pour ses capsules. Des vagues sans fin ; clavier, souris, ou un doigt sur un téléphone.">A cartoon Space Invaders.</p>
<div class="row"><span class="progress" id="zpProgress"></span><span class="btn primary" data-en="Play" data-fr="Jouer">Play</span></div>
</div>
</a>
</section>
<footer>
<p><span data-en="Turtle Quest and Circuits come from" data-fr="Turtle Quest et Circuits viennent de">Turtle Quest and Circuits come from</span> <a href="https://github.com/stephaneweg/onyx">Onyx</a><span data-en=", a homemade operating system for the Raspberry Pi." data-fr=", un système d'exploitation fait maison pour le Raspberry Pi.">, a homemade operating system for the Raspberry Pi.</span></p>
<p><span data-en="Your progress stays in this browser." data-fr="Ta progression reste dans ce navigateur.">Your progress stays in this browser.</span> · MIT · <a href="https://github.com/stephaneweg/CodeIsFun">GitHub</a></p>
</footer>
</main>
<script src="shared/site.js"></script>
<script>
// the stars won so far, read from what each game keeps in the browser
(function () {
const sum = (o) => Object.values ((o && o.stars) || {}).reduce ((a, b) => a + (b | 0), 0);
const show = () => {
const tq = Site.store.get ('codeisfun.turtle', {}), ci = Site.store.get ('codeisfun.circuits', {});
document.getElementById ('tqProgress').textContent = '★ ' + sum (tq) + ' / 144';
document.getElementById ('ciProgress').textContent = '★ ' + sum (ci) + ' / 60';
let dk = 0; try { const p = JSON.parse (localStorage.getItem ('codeisfun.snake.progress') || '{}'); dk = (p.stars || []).reduce ((x, y) => x + (y | 0), 0); } catch (e) { /* (no storage) */ }
document.getElementById ('dkProgress').textContent = '★ ' + dk + ' / 15';
let bk = 0; try { const p = JSON.parse (localStorage.getItem ('codeisfun.brick.progress') || '{}'); bk = (p.stars || []).reduce ((x, y) => x + (y | 0), 0); } catch (e) { /* (no storage) */ }
document.getElementById ('bkProgress').textContent = '★ ' + bk + ' / 36';
let zm = 0; try { const p = JSON.parse (localStorage.getItem ('codeisfun.race.progress') || '{}'); zm = (p.stars || []).reduce ((x, y) => x + (y | 0), 0); } catch (e) { /* (no storage) */ }
document.getElementById ('zmProgress').textContent = '★ ' + zm + ' / 12';
let zp = 0; try { zp = +(JSON.parse (localStorage.getItem ('codeisfun.invaders.record') || '{}').high) || 0; } catch (e) { /* (no storage) */ }
document.getElementById ('zpProgress').textContent = zp ? Site.t ('Best: ', 'Record : ') + zp : '';
};
document.addEventListener ('DOMContentLoaded', show);
}) ();
</script>
</body>
</html>