← Lessons PIXEL PATH Β· 4–6 🌸

Koi State Garden

LESSON 100
🎯 Today's missions
🌸🐟
CHERRY BLOSSOM GARDEN

Koi State Garden

The garden koi is confused! Give each pond event one clear state-change rule so the koi always knows what to do next.

🧠 Before we start

In Oasis Search Party, your program remembered the next place in a queue. Today it remembers the koi's current state. An event can move the koi to a new state only when a matching rule exists. Programmers call this a state machine.

β­• Current state + πŸ”” Event β†’ ✨ Next state
Challenge 1 of 4Build the state rule
1

Build a state-change rule

Tap the three instruction blocks in the order a state machine checks them.

MY VISUAL STATE PROGRAM
1 Β· REMEMBER
2 Β· NOTICE
3 Β· CHANGE

🌟 What you learned

Come back tomorrow for another advanced visual coding adventure! ✨
🌸

The Koi Lost Its Rules!

Events keep changing the pond, but the koi does not know which behavior comes next. Build a state map that makes every change clear.