diff --git a/Source/functions/solve/structure.cpp b/Source/functions/solve/structure.cpp index 3f8dc1a..9833d31 100644 --- a/Source/functions/solve/structure.cpp +++ b/Source/functions/solve/structure.cpp @@ -76,7 +76,7 @@ bool next(vector& log, vector& p_Box, Puzzle& puzzleMat) } } //cout << "next" << endl; - if(log.back().myCoor.n>36) + if(log.back().myCoor.n>8) { cout << "m: " << log.back().myCoor.m << " n: " << log.back().myCoor.n << endl; status(log,p_Box,puzzleMat); @@ -141,6 +141,7 @@ void abstractionlayer1solver(vector& log, vector& p_Box, //remove all that do not fit according to abstraction layer 0 for(int i=0;i<(log.back().PieceCollector.size());) { + //TODO: change checker from checking every box piece to only checking the simplifyed version ob the box with abstraction layer one if(!(puzzleMat.testRotationPiece(log.back().myCoor.m, log.back().myCoor.n, *(log.back().PieceCollector[i])))) { log.back().PieceCollector.erase(log.back().PieceCollector.begin()+i); diff --git a/Source/header/solve.h b/Source/header/solve.h index 6cb3829..a1c7b99 100644 --- a/Source/header/solve.h +++ b/Source/header/solve.h @@ -156,6 +156,14 @@ private: static int randomed; }; +class BoxClassify +{ + vector p_Box; + vector> ab1class; + + +}; + int LogEntry::randomed(0); unsigned int PuzzlePiece::idcount(0); diff --git a/Source/main.cpp b/Source/main.cpp index 8875983..62fc4fb 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -9,7 +9,7 @@ int main() { - int cols=40, rows=40; + int cols=10, rows=10; //some basic part stuff vector myFirstPuzzle; Part myFirstPart; @@ -23,12 +23,13 @@ int main() //undo everything and make this puzzle fucking imba hard!!! //need 40x40 for this, so check your status - makehard4040puzzle(myFirstBox); + //makehard4040puzzle(myFirstBox); //some advanced solver stuff vector log; vector p_myFirstBox; + //BoxClassify myFirstBox(); cout << "original puzzle: " << endl; myRandomBox.printPuzzle(); @@ -37,6 +38,8 @@ int main() p_myFirstBox.push_back(&myFirstBox[i]); Puzzle puzzleMat(cols, rows); + //vector> ab1class = abstractionLayer1classify(log, p_myFirstBox,puzzleMat); + while(next(log, p_myFirstBox,puzzleMat)); puzzleMat.printPuzzle();