Levels
Lv 19
Maze Runner
★★★★★
Navigate walls to reach the exit.
0
Score:
0
/ 1
Hint
Code
Run
Reset
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
hero = makeSprite("hero", 20, 20, { emoji: "🤖", w: 24, h: 24, gravity: 0 }); exit = makeSprite("exit", 340, 340, { emoji: "🚪", w: 30, h: 30, gravity: 0 }); w1 = makeSprite("w1", 80, 0, { color: "#666", w: 20, h: 200, gravity: 0 }); w2 = makeSprite("w2", 200, 200, { color: "#666", w: 20, h: 200, gravity: 0 }); w3 = makeSprite("w3", 300, 0, { color: "#666", w: 20, h: 150, gravity: 0 }); onUpdate(() => { ox = hero.x; oy = hero.y; if (keyDown("arrowright")) hero.x += 3; if (keyDown("arrowleft")) hero.x -= 3; if (keyDown("arrowup")) hero.y -= 3; if (keyDown("arrowdown")) hero.y += 3; if (touching(hero, w1) || touching(hero, w2) || touching(hero, w3)) { hero.x = ox; hero.y = oy; } if (touching(hero, exit)) { addScore(1); endGame(); } });
Game
← Prev
Next →