#include #include #include "input.h" #include #include using namespace std; class coor { public: unsigned int col, row; coor(int newcol=-1,int newrow=-1): col(newcol), row(newrow) {} }; class LogEntry { public: map PieceCollector; int abstractionLevel; coor myCoor; void advance(){abstractionLevel++;} void Set(){set=1;} bool isSet(){return set;} void advanceRandomed() { randomed++;} void decreaseRandomed() { randomed--;} int hasRandomed(){return randomed;} LogEntry() { myCoor = coor(); abstractionLevel=0; set=0; } private: bool set; 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); void createNextLogElement(vector& log, vector& p_Box, Puzzle& puzzleMat);