Package horizons :: Package ai :: Package aiplayer :: Package building :: Module distillery :: Class DistilleryEvaluator
[hide private]
[frames] | no frames]

Class DistilleryEvaluator

source code

buildingevaluator.BuildingEvaluator --+
                                      |
                                     DistilleryEvaluator

Instance Methods [hide private]
 
purpose(self)
Return the BUILDING_PURPOSE constant relevant to the builder.
source code
    Inherited from buildingevaluator.BuildingEvaluator
 
__init__(self, area_builder, builder, value) source code
 
__str__(self) source code
 
_register_builder_position(self) source code
 
execute(self)
Build the specified building complex.
source code
 
have_resources(self)
Return None if the builder is unreachable by road, False if there are not enough resources, and True otherwise.
source code
Class Methods [hide private]
 
create(cls, area_builder, x, y, orientation) source code
    Inherited from buildingevaluator.BuildingEvaluator
 
_distance_to_nearest_building(cls, area_builder, builder, building_id)
Return the shortest distance to a building of type building_id that is in range of the builder.
source code
 
_distance_to_nearest_collector(cls, production_builder, builder, must_be_in_range=True)
Return the shortest distance to a collector that (usually) has to be in range of the builder.
source code
 
_get_alignment(cls, area_builder, coords_list)
Return an alignment value based on the outline of the given coordinates list.
source code
 
_get_alignment_from_outline(cls, area_builder, outline_coords_list)
Return an alignment value given the list of coordinates that form the outline of a shape.
source code
 
_get_outline_coords_list(cls, coords_list)
Return the list of coordinates that share sides the given coordinates list.
source code
 
_weighted_distance(cls, main_component, other_components, none_value)
Return the weights sum of the component distances with the specified weights.
source code
 
get_best_evaluator(cls, evaluators) source code
Class Variables [hide private]
    Inherited from buildingevaluator.BuildingEvaluator
  log = logging.getLogger("ai.aiplayer.buildingevaluator")
  need_collector_connection = True
  record_plan_change = True
Method Details [hide private]

purpose(self)

source code 

Return the BUILDING_PURPOSE constant relevant to the builder.

Decorators:
  • @property
Overrides: buildingevaluator.BuildingEvaluator.purpose
(inherited documentation)