Package horizons :: Package world :: Package buildability :: Module settlementcache :: Class SettlementBuildabilityCache
[hide private]
[frames] | no frames]

Class SettlementBuildabilityCache

source code

binarycache.BinaryBuildabilityCache --+
                                      |
                                     SettlementBuildabilityCache

A specialized BinaryBuildabilityCache for settlements.

Instance Methods [hide private]
 
__init__(self, terrain_cache, settlement_ground_map) source code
 
add_area(self, coords_list)
Add a list of new coordinates to the area.
source code
 
modify_area(self, coords_list)
Refresh the usability of the coordinates in the given list.
source code
    Inherited from binarycache.BinaryBuildabilityCache
 
_reset_lazy_sets(self) source code
 
remove_area(self, removed_coords_list)
Remove a list of existing coordinates from the area.
source code
Class Methods [hide private]
    Inherited from binarycache.BinaryBuildabilityCache
 
_extend_set(cls, cur_set, prev_set, prev_set_additions, dx, dy) source code
 
_reduce_set(cls, cur_set, prev_set_removals, dx, dy) source code
Method Details [hide private]

__init__(self, terrain_cache, settlement_ground_map)
(Constructor)

source code 
Overrides: binarycache.BinaryBuildabilityCache.__init__

add_area(self, coords_list)

source code 

Add a list of new coordinates to the area.

Overrides: binarycache.BinaryBuildabilityCache.add_area

modify_area(self, coords_list)

source code 

Refresh the usability of the coordinates in the given list.

This function is called with a list of coordinates on which the possibility of building a building may have changed to update the underlying BinaryBuildabilityCache.