❓ Chapter 4: Conditions · Level 21 of 30
Level 21: Left Spiral
Goal: This spiral turns the other way. Change the rule to fit. ★★★ = 4 blocks or fewer.
▶ Watch how it works
The same idea with left turns: free ahead? forward. Blocked? turn left.
Got it? Now solve your puzzle ↓ (a different board — work it out yourself!)
Blocks — tap to add
Your program
💡 Need a hint?
Same idea as the last level — but which way must the robot turn when the path is blocked?
What you learn here
A good rule can solve a long path with just a few blocks, no matter how long the path is.
Chapter 4 — Conditions: Teach the robot to decide for itself: keep going until the star, and turn only when the path is blocked.
Blocks in this level
- ⬆️move forwardThe robot moves one square the way it is facing.
- ↩️turn leftThe robot turns to its left on the same square.
- ❓if path aheadIf the square ahead is free, runs the first part; if a rock or the edge is ahead, runs the “else” part.
- 🔂repeat until starKeeps running the blocks inside until the robot is on the star.