![]() Jul 26 2013, 9:20 am
|
|
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.
|
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. |