Region

by Theodis
A datum which uses the flood fill algorithm to find all connected nodes on a graph according to a supplied criteria
ID:116808
 
Updates:
Version 2 - 1/28/2009
Massive speed increase

Usage

Region
The region object performs a flood fill to find all nodes within a graph
connected to an initial node according to the logic of the proc passed into the
constructor.

New(source,accessibleNodes)
source - The node to begin the search at.
accessibleNodes - A proc that accepts a node on the graph being search and
returns all connected nodes that meet the desired criteria of the search.

Creates the region datum and performs the search. Results are stored within the
datums contents[] var.

Update()
Performs the search again using the same criteria as when the object was
created.
Whenever I'm serious about making a game, I always come back to your libraries. I can't believe something like this has only been downloaded 33 times.
Note that this library includes the map outside of the demo tags in the DME.