Changed dp calculation

This commit is contained in:
Raphael Maenle
2018-01-20 09:40:03 +01:00
parent 1c85bee091
commit 7a3b33455d
13 changed files with 57 additions and 259 deletions

View File

@ -1,7 +1,3 @@
//
// Created by mpapa on 05.12.2017.
//
#include "DestructionPower.h"
//TODO! Add more layers here!
@ -39,6 +35,8 @@ bool DestructionPower::RemoveConstraintOnPosition(const coor constraintCoordinat
//gets destruction power from left and from top if possible and normalizes
void DestructionPower::DestructionOfSurrounding(const coor constraintCoordinate) {
for(int i = 0; i < m_constraintMatrix[constraintCoordinate.col][constraintCoordinate.row].DestructionArray.size(); ++i)
m_constraintMatrix[constraintCoordinate.col][constraintCoordinate.row].DestructionArray.pop_back();
for (int i = 0; i < DESTRUCTION_COUNT; ++i) {
m_constraintMatrix[constraintCoordinate.col][constraintCoordinate.row].DestructionArray.push_back(0);

View File

@ -1,10 +1,6 @@
//
// Created by mpapa on 05.12.2017.
//
#pragma once
//TODO!! increase Destructioncount
#define DESTRUCTION_COUNT 2
#define DESTRUCTION_COUNT 1
#include "DestructionPower_Properties.h"
#include "../AbstraktionLayer_Base.h"

View File

@ -1,6 +1,3 @@
//
// Created by mpapa on 05.12.2017.
//
#pragma once
#define DESTRUCTION_INIT 0.5