Package horizons :: Package world :: Package buildability :: Module simplecollectorareacache :: Class SimpleCollectorAreaCache
[hide private]
[frames] | no frames]

Class SimpleCollectorAreaCache

source code

A specialized PartialBinaryBuildabilityCache for keeping track of collector coverage.

The AI uses instances of this class to figure out where it can place buildings such that at least some part of the building would be covered by a general collector. It is a simple version in that it doesn't check whether a road to the corresponding collector would be possible.

Instance Methods [hide private]
 
__init__(self, terrain_cache) source code
 
add_building(self, building)
Take the the coverage area of the given building into account.
source code
 
remove_building(self, building)
Stop taking the coverage area of the given building into account.
source code