Hi ,
When I used the gcc 4.8.2 to build the code , there were some errors in village_control.cpp 's line 89/103/175 .
I try to modify this file as below . As I have never used template class C++ feature (I even can't find the “PTask”'s definition … ) , I don't know whether it is correct , please help me to check . Thanks a lot .
It is an awesome game , do you have any plan about multi-language support ? I notice there are a lot of hard-code string in current source code .
Shazoo
========================================
diff –git a/village_control.cpp b/village_control.cpp
old mode 100755
new mode 100644
index b3fe7ef..f0e6f83
— a/village_control.cpp
+++ b/village_control.cpp
@@ -86,7 +86,6 @@ PTask VillageControl::Villain::getAttackTask(VillageControl* self) {
case VillageBehaviourId::KILL_MEMBERS: return Task::killFighters(collective, behaviour.get());
case VillageBehaviourId::STEAL_GOLD: return Task::stealFrom(collective, self->getCollective());
}
– return NULL;
}
string VillageControl::getAttackMessage(const Villain& villain, const vector attackers) const {
@@ -100,7 +99,6 @@ string VillageControl::getAttackMessage(const Villain& villain, const vector return “You are under attack by ” + getCollective()->getTribe()->getName() +
” of ” + getCollective()->getName() + “!”;
}
– return “”;
}
static double powerClosenessFun(double myPower, double hisPower) {
@@ -171,8 +169,7 @@ double VillageControl::Villain::getTriggerValue(const Trigger& trigger, const Vi
villain->getCreatures(MinionTrait::FIGHTER).size(), trigger.get());
case AttackTriggerId::GOLD:
return goldMaxProb * goldFun(villain->numResource(Collective::ResourceId::GOLD), trigger.get());
– }
– return 0;
+ }
}
double VillageControl::Villain::getAttackProbability(const VillageControl* self) const {
~