🤖 Mission Map
Energy: 10
Crystals: 0/3
Moves: 0
⬜ Collect 3 crystals
⬜ Keep energy above 0
⬜ Return to base
Add commands, then press Run Mission.
🏅 Badge earned: Resource Planner!
🧩 Build Robot Program
Coding concept: A variable stores a value that can change. In this mission, energy, crystals, and moves are variables.
energy = energy - 1 after every move
crystals = crystals + 1 when robot collects crystal
energy = energy + 4 when robot collects battery
crystals = crystals + 1 when robot collects crystal
energy = energy + 4 when robot collects battery
A good coder does not only find a path. A good coder checks resources too.