Package horizons :: Package world :: Package buildability :: Module freeislandcache :: Class FreeIslandBuildabilityCache
[hide private]
[frames] | no frames]

Class FreeIslandBuildabilityCache

source code

An instance of this class is used to keep track of the unclaimed area on an island.

Instances of this class can answer the same queries as BinaryBuildabilityCache. It is specialized for keeping track of the unclaimed land on an island. That way it is possible to use it in conjunction with the TerrainCache to find all available warehouse positions on an island.

Note that the cache is initialized with all unclaimed tiles on the island and after that it can only reduce in size because it is currently impossible for land to change ownership after it has been claimed by the first player.

Instance Methods [hide private]
 
__init__(self, island) source code
 
_init(self) source code
 
remove_area(self, coords_list)
Remove a list of existing coordinates from the area.
source code
 
add_area(self, coords_list)
Add a list of coordinates to the area.
source code