SimCity 2K Power

BlitzMax Forums/BlitzMax Programming/SimCity 2K Power

Don't see a problem with an algorithm:

1. The algorithm will be recursive (you know that there can only be some power if there is a "deliverying" field around it that delivers power)
2. The algorithm will prefer power lines to "line free" as power lines transport electricity, free fields only spread it.
3. The algorithm is only executed if something changes (power plant created / exploded / destroy - power line built / destroyed - power consumption raised / dropped)

There is no reason to keep checking. If nothing happens (only the above events are influencing the power source), there is no reason to recheck the whole thing.