author | truelight |
Sat, 14 Jul 2007 21:15:49 +0000 | |
branch | noai |
changeset 9657 | f2c6e332d8bc |
parent 9655 | e8e43f333832 |
child 9710 | ba44f8c1fd52 |
permissions | -rw-r--r-- |
9649
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
1 |
#include "ai_industrylist_valuator.hpp" |
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
2 |
#include "ai_industry.hpp" |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
3 |
#include "ai_map.hpp" |
9649
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
4 |
|
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
5 |
int32 AIIndustryListProduction::Valuate(int32 industry) const |
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
6 |
{ |
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
7 |
return AIIndustry::GetProduction(industry, this->cargo_type); |
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
8 |
} |
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
9 |
|
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
10 |
int32 AIIndustryListLocation::Valuate(int32 industry) const |
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
11 |
{ |
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
12 |
return AIIndustry::GetLocation(industry); |
bc8c06513f5b
(svn r10544) [NoAI] -Add: added AIIndustryList to list industries
truelight
parents:
diff
changeset
|
13 |
} |
9655
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
14 |
|
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
15 |
int32 AIIndustryListDistanceManhattanToTile::Valuate(int32 industry) const |
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
16 |
{ |
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
17 |
return AIMap::DistanceManhattan(this->tile, AIIndustry::GetLocation(industry)); |
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
18 |
} |
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
19 |
|
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
20 |
int32 AIIndustryListDistanceSquareToTile::Valuate(int32 industry) const |
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
21 |
{ |
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
22 |
return AIMap::DistanceSquare(this->tile, AIIndustry::GetLocation(industry)); |
e8e43f333832
(svn r10557) [NoAI] -Add: added for all lists 2 valuators: DistanceManhattanToTile and DistanceSquareToTile, to get the distance from object to some tile you specify
truelight
parents:
9649
diff
changeset
|
23 |
} |