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:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user