added positive ageing to destructionPower

This commit is contained in:
Raphael Maenle 2017-12-21 13:35:13 +01:00
parent 86c4e26bc7
commit bfed4aba05
2 changed files with 10 additions and 4 deletions

View File

@ -4,7 +4,7 @@
#include "DestructionPower.h"
//TODO! Add more layers here!
map<int,float> DestructionPower_Properties::SpeedTable =
{
{1,0.001}
@ -48,7 +48,13 @@ void DestructionPower::DestructionOfSurrounding(const coor constraintCoordinate)
newDestructionArray[i] /=divisor;
}
}
DestructionPower_Properties::DestructionPower_Properties() {
for(int i=0;i<sizeof(DestructionArray);i++)
DestructionArray.emplace_back(DestructionPower_Properties::SpeedTable[i]*DESTRUCTION_INIT);
float aging=1.001;
for(int i=0;i<DestructionArray.size();i++)
{
DestructionArray.emplace_back((DestructionPower_Properties::SpeedTable[i]*DESTRUCTION_INIT));
DestructionArray.back()<0.99 ? DestructionArray.back()*=aging:DestructionArray.back();
}
}

View File

@ -10,4 +10,4 @@
using namespace std;
#include "header/input.h"
#include "header/solve.h"
#include "header/solve.h"