Levels
Lv 54
Reaction Test 2
★★★★★
Score 1000 in this challenge.
0
Score:
0
/ 1000
Hint
Code
Run
Reset
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
light = makeSprite("light", 180, 180, { color: "#ff0000", w: 80, h: 80, gravity: 0 }); green = false; tick = 0; next = random(60, 180); setMessage("Wait for GREEN, then SPACE!"); onUpdate(() => { tick += 1; if (!green && tick >= next) { green = true; setColor(light, "#00ff00"); } }); whenKey(" ", () => { if (green) { addScore(1); green = false; setColor(light, "#ff0000"); tick = 0; next = random(60, 180); } else { setColor(light, "#ff8800"); tick = 0; next = random(60, 180); } }); // Goal: nail 1000 reactions!
Game
← Prev
Next →