Layer logic done, dispatcher simplified

This commit is contained in:
Raphael Maenle
2018-01-22 19:20:25 +01:00
parent 1161b972ba
commit 7979d28422
7 changed files with 101 additions and 26 deletions

View File

@ -70,6 +70,11 @@ float DestructionPower::defaultDestructionPower(int i)
//gets next highest valued abstraction layer down from current one (if first, get highest)
int DestructionPower::getNextAbstractionLayer(coor newCoordinate, int currentAbstractionLayer)
{
if(++currentAbstractionLayer>=DESTRUCTION_COUNT)
return -1;
else
return currentAbstractionLayer;
float currentPower = 1;
int nextLayer=-1;
float nextLayerPower=0;