(svn r12236) [NoAI] -Change: [API CHANGE] All valuators are now in the notation: AI<type>List_v<Valuator>. Example: AIVehicleList_vAge
#include "ai_townlist_valuator.hpp"
#include "ai_town.hpp"
#include "ai_map.hpp"
#include "ai_base.hpp"
int32 AITownList_vRandomize::Valuate(int32 town) const
{
return AIBase::Rand();
}
int32 AITownList_vPopulation::Valuate(int32 town) const
{
return AITown::GetPopulation(town);
}
int32 AITownList_vLocation::Valuate(int32 town) const
{
return AITown::GetLocation(town);
}
int32 AITownList_vDistanceManhattanToTile::Valuate(int32 town) const
{
return AIMap::DistanceManhattan(this->tile, AITown::GetLocation(town));
}
int32 AITownList_vDistanceSquareToTile::Valuate(int32 town) const
{
return AIMap::DistanceSquare(this->tile, AITown::GetLocation(town));
}