removed bugs. some puzzles take forever. most can be solved

This commit is contained in:
g-spacewhale
2017-11-19 22:53:00 +01:00
parent 15940f41da
commit aa00553bdb
4 changed files with 165 additions and 49 deletions

View File

@ -1,4 +1,5 @@
#define MAX_ABSTRAX 1
#define structdebug
#include "header.h"
@ -7,7 +8,7 @@
int main()
{
int cols=3, rows=2;
int cols=10, rows=10;
//some basic part stuff
vector<Part> myFirstPuzzle;
Part myFirstPart;
@ -18,7 +19,6 @@ int main()
randomBox myRandomBox(cols,rows);
myRandomBox.createRandomPuzzle();
vector<PuzzlePiece> myFirstBox = myRandomBox.shuffle();
myRandomBox.printPuzzle();
@ -26,9 +26,14 @@ int main()
vector<LogEntry> log;
vector<PuzzlePiece*> p_myFirstBox;
cout << "original puzzle: " << endl;
myRandomBox.printPuzzle();
cout << endl;
for(int i=0;i<myFirstBox.size();i++)
p_myFirstBox[i] = &myFirstBox[i];
p_myFirstBox.push_back(&myFirstBox[i]);
Puzzle puzzleMat(cols, rows);
while(next(log, p_myFirstBox,puzzleMat));
puzzleMat.printPuzzle();
}