equal
deleted
inserted
replaced
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 } |