From ae9e4633d60397c685e442e00e02e17b18dc80fd Mon Sep 17 00:00:00 2001 From: Raphael Maenle <17550607+g-spacewhale@users.noreply.github.com> Date: Fri, 22 Dec 2017 23:09:23 +0100 Subject: [PATCH] added dp to puzzle --- .../AbstractionLayers/DestructionPower/DestructionPower.cpp | 2 +- .../AbstractionLayers/DestructionPower/DestructionPower.h | 3 +-- Source/functions/solve/structure.cpp | 4 ++-- Source/header/solve.h | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.cpp b/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.cpp index 6e1baec..bdcdae3 100644 --- a/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.cpp +++ b/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.cpp @@ -21,7 +21,7 @@ bool DestructionPower::EvaluateQuality (const coor constraintCoordinate, quality { } -bool DestructionPower::SetConstraintOnPosition(const coor constraintCoordinate, const AbstractionLayer_1_Properties constraint) +bool DestructionPower::SetConstraintOnPosition(const coor constraintCoordinate, const DestructionPower_Properties constraint) { } diff --git a/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.h b/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.h index f910a18..2319f9e 100644 --- a/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.h +++ b/Source/functions/AbstractionLayers/DestructionPower/DestructionPower.h @@ -19,12 +19,11 @@ class DestructionPower : public AbstractionLayer_Base* partArray)override; bool EvaluateQuality (coor constraintCoordinate, qualityVector& qVector) override; - bool SetConstraintOnPosition(coor constraintCoordinate, AbstractionLayer_1_Properties constraint); + bool SetConstraintOnPosition(coor constraintCoordinate, DestructionPower_Properties constraint); bool RemoveConstraintOnPosition(coor constraintCoordinate)override; void DestructionOfSurrounding(coor constraintCoordinate); int getNextAbstractionLayer(coor newCoordinate, int currentAbstractionLayer); - private: }; diff --git a/Source/functions/solve/structure.cpp b/Source/functions/solve/structure.cpp index ef225a1..cfa5a78 100755 --- a/Source/functions/solve/structure.cpp +++ b/Source/functions/solve/structure.cpp @@ -44,7 +44,7 @@ void createNextLogElement(vector& log, vector& p_Box, Puzzle& p { log.emplace_back(LogEntry(coor(0, 0))); log.back().myCoor = calculateNextCoor(log, p_Box,puzzleMat); - puzzleMat.dp->DestructionOfSurrounding(log.back().myCoor);//calculate dp from surrounding + puzzleMat.dp.DestructionOfSurrounding(log.back().myCoor);//calculate dp from surrounding solve(log, p_Box,puzzleMat); } @@ -69,7 +69,7 @@ coor calculateNextCoor(vector& log, vector& p_Box, Puzzle& puzz void solve(vector& log, vector& p_Box, Puzzle& puzzleMat) { - puzzleMat.dp->getNextAbstractionLayer(log.back().myCoor,log.back().abstractionLevel); //sets in abstractionLevel + puzzleMat.dp.getNextAbstractionLayer(log.back().myCoor,log.back().abstractionLevel); //sets in abstractionLevel //status(log,p_Box,puzzleMat); switch(log.back().abstractionLevel) { diff --git a/Source/header/solve.h b/Source/header/solve.h index 47ade58..3150ed9 100755 --- a/Source/header/solve.h +++ b/Source/header/solve.h @@ -50,7 +50,7 @@ public: coor getSizeAsCoor() {return {cols,rows};} - DestructionPower* dp; + DestructionPower dp; AbstractionLayer_1 a1; void removeConstrains(coor removeCoordinates);