src/ai/api/ai_stationlist_valuator.cpp
branchnoai
changeset 9655 e8e43f333832
parent 9648 760b7b504e37
child 9753 7209db94ad12
equal deleted inserted replaced
9654:b836eb5c521f 9655:e8e43f333832
     1 /* $Id$ */
     1 /* $Id$ */
     2 
     2 
     3 #include "ai_stationlist_valuator.hpp"
     3 #include "ai_stationlist_valuator.hpp"
     4 #include "ai_station.hpp"
     4 #include "ai_station.hpp"
       
     5 #include "ai_map.hpp"
     5 
     6 
     6 int32 AIStationListLocation::Valuate(int32 station) const
     7 int32 AIStationListLocation::Valuate(int32 station) const
     7 {
     8 {
     8 	return AIStation::GetLocation(station);
     9 	return AIStation::GetLocation(station);
     9 }
    10 }
    15 
    16 
    16 int32 AIStationListCargoRating::Valuate(int32 station) const
    17 int32 AIStationListCargoRating::Valuate(int32 station) const
    17 {
    18 {
    18 	return AIStation::GetCargoRating(station, this->cargo_type);
    19 	return AIStation::GetCargoRating(station, this->cargo_type);
    19 }
    20 }
       
    21 
       
    22 int32 AIStationListDistanceManhattanToTile::Valuate(int32 station) const
       
    23 {
       
    24 	return AIMap::DistanceManhattan(this->tile, AIStation::GetLocation(station));
       
    25 }
       
    26 
       
    27 int32 AIStationListDistanceSquareToTile::Valuate(int32 station) const
       
    28 {
       
    29 	return AIMap::DistanceSquare(this->tile, AIStation::GetLocation(station));
       
    30 }