❓ Chapter 4: Conditions · Level 23 of 30
Level 23: Side Step
Goal: Rocks block the way. Teach the robot to side-step up one row each time a rock is ahead. ★★★ = 6 blocks or fewer.
▶ Watch how it works
The else part can hold several blocks: when a rock is ahead, step up and around it.
Got it? Now solve your puzzle ↓ (a different board — work it out yourself!)
Blocks — tap to add
Your program
💡 Need a hint?
If the path ahead is free, move forward. Else: turn left, move forward, turn right.
What you learn here
The else part can hold several blocks. It runs them all, in order, when the condition is not true.
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.
- ↪️turn rightThe robot turns to its right 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.