Play Sweep League

Floody

the flood fill

Loading audio…

Press play to listen along. The line being read lights up as you go.

Show full transcript

Loading transcript…

01 Opening
Floody beat 1 of 5

Floody is a duck. A thoroughly, gloriously happy duck. She paddles in slow circles around the pond at the edge of the League Field, and every so often she simply cannot help herself. She rears up, slaps both wings down flat on the water, and sends a wave rolling outward, ripple after ripple after ripple, spreading in every direction at once until it laps gently against the grass on every shore.

"Splash!" she quacks, delighted all over again every single time. "One splash, and look how far it goes!"

That wave, it turns out, is exactly what happens on a Minesweeper board when you open a zero.

02 Floody
Floody beat 2 of 5

A young hedgehog came trundling down to the pond one afternoon, his quills slightly on end with confusion. "Something weird keeps happening," he said. "Sometimes I click one single square, and a huge chunk of the board just opens up all by itself. Half the board, sometimes. Is the game broken?"

Floody let out a big, honking, happy laugh that sent ripples across the pond without any help from her wings at all. "Broken? Not a bit! That's the very best thing in the whole game. Come here, I'll show you exactly why."

She waddled out onto a fresh board and pointed across it with one wingtip. "Every square you open shows a number, and that number tells you how many mines are touching it, in the eight squares all around. A one means one mine is somewhere next to it. A two means two. And a zero..." She paused dramatically, eyes sparkling. "A zero means that none of the eight squares around it hides a mine. Not a single one."

"So?" said the hedgehog.

03 Floody
Floody beat 3 of 5

"So if no mines touch a square," said Floody, "then every square next to it must be safe. All eight, guaranteed. The game knows that just as well as you do, so instead of making you click them one by one, it opens all of them for you. Automatically. You don't lift a claw."

She tapped a square with her bill. It showed a zero, and at once the eight squares around it flipped open.

"And now here's the splashy part," she went on, bouncing on her webbed feet. "Look at those eight new squares. If any of them is also a zero, then its neighbors must be safe too. So the game opens those as well. And if any of those are zeros, it opens their neighbors, and on and on."

The hedgehog's eyes grew wider and wider as he watched. The opening spread outward from zero to zero, square to square, rolling across the board in exactly the way Floody's wave rolled across the pond. It kept going and going, until finally it came up against a ring of squares that each showed a number, squares that touched at least one mine. And there, all around its edge, it stopped.

04 Floody
Floody beat 4 of 5

"It stops at the numbers," the hedgehog said, amazed.

"Exactly right," said Floody. "The numbers are the shore. A square with a number on it isn't a zero, so it doesn't spread any further. It gets opened, because it sits right beside a zero, but its own neighbors stay closed. So the wave washes open the entire empty region, every connected zero, and then it stops neatly along a border of numbers, the way water stops at the edge of a pond. People who write computer programs call this a flood fill, because that's exactly what it looks like: something pouring outward until it hits a wall. And all of it," she spread her wings as wide as they would go, "happened from one single click."

"That's why Bevvy counts each empty region as only one click," the hedgehog said slowly, remembering what the honeybee had taught him. "Because one splash opens the whole thing."

"Yes!" quacked Floody, so pleased she did a small spin. "An entire empty region, however enormous it is, only ever costs one click, because one zero sets the whole chain going. That's why finding a zero feels so lucky and lovely. One little tap and a huge part of the board opens up to you, and every one of those new numbers along the shore is a fresh clue."

05 Closing
Floody beat 5 of 5

Then she added something more thoughtfully, settling her feathers. "And notice one more thing. The wave only ever opens safe squares. It can't open a mine by accident, because it only spreads from zeros, and a zero is a promise that there's nothing dangerous next to it. Every step of the chain is proven safe by the step before. That's why the wave is always safe to ride. It's a chain of promises, each one keeping the next."

The hedgehog grinned, and from that afternoon on he hunted for zeros on every board he played.

Floody feels most like Floody in the very second a zero opens and the wave begins to spread, rolling out and out across the board. It is a wide, splashy, laughing feeling, like a cannonball into cool water on the hottest day of summer, the whole pond rippling with joy.

You have some Floody in you whenever one small action opens up something enormous. When you find a zero, watch the whole empty region wash open, and say it the way she does: "Floody opens a zero, and the whole empty field washes open."

Then look along the shore of numbers, and keep going.

Hear it as an audio drama

A short play starring Floody, from Sweep League. Different voices, same idea. Listen any time after you read.

Loading audio…

Read the drama script
  1. Narrator: From Spark and Anvil and Sweep League — this is Floody, in chapter 1 of the Sweep League cast.
  2. Narrator: This drama uses an AI-generated voice. Voiced via Gemini 2.5.
  3. Narrator: Floody the duck slapped the pond with her wings and sent ripples rolling out in every direction.
  4. Floody: Splash! One splash, and look how far it goes!
  5. Hedgehog: Sometimes I click one square and half the board opens by itself. Is the game broken?
  6. Floody: Not broken! That's the best part. A zero means no mines touch it. So every square around it must be safe, and the game opens them all.
  7. Hedgehog: And if one of those is a zero too?
  8. Floody: Then its neighbours open too! And on and on, zero to zero.
  9. Narrator: The opening spread across the board until it reached a ring of numbers, and there it stopped.
  10. Hedgehog: It stops at the numbers.
  11. Floody: The numbers are the shore! And the wave only ever opens safe squares, because a zero is a promise.
  12. Hedgehog: So a whole empty region costs just one click.
  13. Narrator: Open a zero, and the whole empty field washes open. That's Floody's whole idea.
  14. Narrator: You've been listening to a Spark and Anvil chapter, written by the Spark and Anvil writing team for ages 9 to 14.
  15. Narrator: Apps stay free forever.
  16. Narrator: Curriculum aligned to Common Core and Next Generation Science Standards.
  17. Narrator: Released under Creative Commons BY-NC-SA 4.0 for educational reuse. Visit Spark and Anvil for the full transcript.

The Sweep League ensemble

Floody is one of the friends in Sweep League. Each friend shows you one idea by how they act; meet them all and you have the whole subject.