← LessonsPIXEL PATH · 4–6🏰

Castle Lease Lantern

LESSON 133
🎯 Today's missions
🏰🏮🧙
MAGIC CASTLE

Castle Lease Lantern

Two wizards need the same spell tower, but only one may cast there at a time. Build a timed lease, pass the lantern when time ends, and stop an old spell from sneaking through.

🧠 Before we start

Oasis One-Key Well used one key to protect shared work. But what if its owner disappears? A lease is a lock with a timer. When it expires, a new owner gets a bigger numbered token, so late work from the old owner can be rejected.

🙋 Ask→🏮 Lease→⏳ Time ends→🔢 New token wins
Challenge 1 of 4Build the lease program
1

Build the lantern program

Tap the instruction blocks in order. A wizard asks first, receives one timed lantern, casts while time remains, then returns it.

VISUAL PROGRAM · ONE OWNER FOR A LIMITED TIME
1 · ASK
2 · GRANT
3 · TIMER
4 · WORK
5 · RETURN

🌟 What you learned

Come back tomorrow for another advanced visual coding adventure! ✨