OOP Studio Ages 9-15
State Challenge: Energy Rescue
Use methods to match Fizz’s energy to each mission target.
Your Mission
Help Fizz reach the exact target energy before the moves run out.
play()takes away 1 energysnack()adds 1 energyrecharge()sets energy to 5Think first: What will Fizz’s energy be after you press the method?
Wake Fizz for launch!
Fizz has 1 energy. Reach exactly 3 energy in two moves.
START 1
→
TARGET 3
Choose the next method
JavaScript calls
Choose a method.
Watch the current energy and aim for the target.
CURRENT1
TARGET3
MOVES LEFT2
Target reached!
New mission loading.
Energy: 1
All energy missions complete!
You chose methods by predicting how each one changes state.
Completed! Start Encapsulation