Spellbook Dependency Web
The Moonlight Charm has vanished from the spellbook! Reconnect what each spell needs, then guide the castle through the right build order.
๐ง Before we start
At the Big Top, you queued tasks by arrival time. But some tasks cannot begin just because they arrived first. A dependency says, โfinish this prerequisite before that task can start.โ Programs use dependency graphs to build apps, load worlds, and plan work safely.
Connect the dependency web
Tap a prerequisite, then tap the spell that needs it. The brew needs both ingredients; the final charm needs the brew.
Run only ready tasks
A task is ready when every prerequisite pointing to it is finished. Complete the spell without breaking a dependency.
Find work that can happen together
Star Dew and Moon Dust do not depend on each other. Choose the plan that uses that independence to finish sooner.
Debug the endless waiting loop
The treasure key waits for the chest to open, while the chest waits for the key. Remove the mistaken dependency that creates the cycle.
๐ What you learned
- A dependency tells a task which prerequisite must finish first.
- A dependency graph connects tasks with directional links.
- A task becomes ready only after all of its prerequisites are complete.
- Independent branches can run in parallel, then join later.
- A cycle makes tasks wait on each other forever; breaking the wrong link repairs it.