🌊 Flood Protocol
Algo-Game • Breadth-First Search • VISUALIZER (not a game — see CONCEPT §4a)
Mission
Level
1
Pump Charges  --
Wave Ring
0
Flooded
0
Path Length
Algorithm Reveal
💡 That was Breadth-First Search (BFS)
Why the flood guarantees the shortest path:
  • Every “Spread” fills one ring — all cells exactly d steps from the start.
  • Cells at distance d are completely filled before any cell at distance d+1 even gets wet.
  • So the first moment water touches the Goal, it arrived via the shortest possible route.
  • Greedy/DFS can find a path but may walk past shortcuts and get trapped. The flood misses nothing.

Complexity: O(V + E) — every cell visited once, every passage checked once.