Fixed error in AbstractionLayer + redefine of solve.h

This commit is contained in:
TabDragon 2017-12-20 22:09:41 +01:00
parent 1fabe84848
commit 7ba76b4881
2 changed files with 12 additions and 7 deletions

View File

@ -106,7 +106,7 @@ void AbstractionLayer_1::setEdgeZero()
bool AbstractionLayer_1::PlaceOfPartGood(coor myCoor, uint8_t& myPart) 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][myCoor.row+1].m_connections & 0b11000000);
negativePart or_eq (m_constraintMatrix[myCoor.col-1][myCoor.row].m_connections & 0b00110000); negativePart or_eq (m_constraintMatrix[myCoor.col-1][myCoor.row].m_connections & 0b00110000);

View File

@ -1,3 +1,6 @@
#ifndef SOURCE_SOLVE_H
#define SOURCE_SOLVE_H
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include "input.h" #include "input.h"
@ -39,10 +42,12 @@ private:
static int randomed; static int randomed;
}; };
bool next(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box, Puzzle& puzzleMat); bool next(vector<LogEntry>& log, vector<Part*>& p_Box, Puzzle& puzzleMat);
coor calculateNextCoor(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box, Puzzle& puzzleMat); coor calculateNextCoor(vector<LogEntry>& log, vector<Part*>& p_Box, Puzzle& puzzleMat);
void solve(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box, Puzzle& puzzleMat); void solve(vector<LogEntry>& log, vector<Part*>& p_Box, Puzzle& puzzleMat);
void setsolution(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box, Puzzle& puzzleMat); void setsolution(vector<LogEntry>& log, vector<Part*>& p_Box, Puzzle& puzzleMat);
bool backtrack(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box, puzzleMat); bool backtrack(vector<LogEntry>& log, vector<Part*>& p_Box, puzzleMat);
void createNextLogElement(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box, Puzzle& puzzleMat); void createNextLogElement(vector<LogEntry>& log, vector<Part*>& p_Box, Puzzle& puzzleMat);
#endif //SOURCE_SOLVE_H