From 7ba76b488116abfbea4253b61e889c0cf074a111 Mon Sep 17 00:00:00 2001 From: TabDragon <31097001+TabDragon@users.noreply.github.com> Date: Wed, 20 Dec 2017 22:09:41 +0100 Subject: [PATCH] Fixed error in AbstractionLayer + redefine of solve.h --- .../Layer1/AbstractionLayer_1.cpp | 2 +- Source/header/solve.h | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp b/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp index f588bc1..cd6ac30 100644 --- a/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp +++ b/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp @@ -106,7 +106,7 @@ void AbstractionLayer_1::setEdgeZero() bool AbstractionLayer_1::PlaceOfPartGood(coor myCoor, uint8_t& myPart) { - uint8_t negativePart(0)=0b00000000; + uint8_t negativePart = 0b00000000; negativePart or_eq (m_constraintMatrix[myCoor.col][myCoor.row+1].m_connections & 0b11000000); negativePart or_eq (m_constraintMatrix[myCoor.col-1][myCoor.row].m_connections & 0b00110000); diff --git a/Source/header/solve.h b/Source/header/solve.h index 71ad5e8..777b3fc 100755 --- a/Source/header/solve.h +++ b/Source/header/solve.h @@ -1,3 +1,6 @@ +#ifndef SOURCE_SOLVE_H +#define SOURCE_SOLVE_H + #include #include #include "input.h" @@ -39,10 +42,12 @@ private: static int randomed; }; -bool next(vector& log, vector& p_Box, Puzzle& puzzleMat); -coor calculateNextCoor(vector& log, vector& p_Box, Puzzle& puzzleMat); -void solve(vector& log, vector& p_Box, Puzzle& puzzleMat); -void setsolution(vector& log, vector& p_Box, Puzzle& puzzleMat); -bool backtrack(vector& log, vector& p_Box, puzzleMat); +bool next(vector& log, vector& p_Box, Puzzle& puzzleMat); +coor calculateNextCoor(vector& log, vector& p_Box, Puzzle& puzzleMat); +void solve(vector& log, vector& p_Box, Puzzle& puzzleMat); +void setsolution(vector& log, vector& p_Box, Puzzle& puzzleMat); +bool backtrack(vector& log, vector& p_Box, puzzleMat); -void createNextLogElement(vector& log, vector& p_Box, Puzzle& puzzleMat); \ No newline at end of file +void createNextLogElement(vector& log, vector& p_Box, Puzzle& puzzleMat); + +#endif //SOURCE_SOLVE_H \ No newline at end of file