improved random generator, made information call from Part more direct

todo: add indexing to puzzlepieces and all four rotation into puzzlebox (or maybe only log?). this needs to be done for random algorithm and for realPuzzle
This commit is contained in:
Raphael Maenle
2017-12-21 13:07:01 +01:00
parent bd07d291db
commit 86c4e26bc7
6 changed files with 40 additions and 24 deletions

View File

@ -38,7 +38,8 @@ public:
m_numOfRotations = numOfRotations;
}
LayerContainer* myLayers;
AbstractionLayer_1_Properties m_test1;
DestructionPower_Properties m_destruction;
private:
int32_t m_partID;
uint8_t m_numOfRotations;

View File

@ -50,10 +50,11 @@ public:
void removeConstrains(coor removeCoordinates);
void printPuzzle();
void createRandomBox(){createRandomPuzzle();putIntoBox();shuffle();}
void createRandomBox(){createRandomPuzzle();putIntoBox();shuffle();createp_box();}
void createRandomPuzzle();
void putIntoBox();
void shuffle();
void createp_box();
vector<Part> myBox;
vector<Part*> p_myBox;
@ -64,14 +65,6 @@ private:
unsigned int cols;
};
class LayerContainer
{
public:
AbstractionLayer_1_Properties m_test1;
DestructionPower_Properties m_destruction;
};
bool next(vector<LogEntry>& log, vector<Part*>& p_Box, Puzzle& puzzleMat);
coor calculateNextCoor(vector<LogEntry>& log, vector<Part*>& p_Box, Puzzle& puzzleMat);
void solve(vector<LogEntry>& log, vector<Part*>& p_Box, Puzzle& puzzleMat);