Alternatively, you could also use a scanline fill. It's the same as flood-fill but it visits each node(turfs, in your case) once.
How would that work? I'm not 100% familiar with scanline fill.
http://en.wikipedia.org/wiki/File:Smiley_fill.gif

Scanline fill is sort of like a regular flood fill, but it uses a stack, rather than a queue for processing area. It's an area-centric algorithm, rather than a process-centric algorithm. More or less, it's slightly more efficient in some cases.
Page: 1 2 3