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:
@ -18,7 +18,7 @@ bool AbstractionLayer_1::EvaluateQuality (const coor constraintCoordinate, quali
|
||||
{
|
||||
for(auto it = qVector.begin(); it != qVector.end(); it++)
|
||||
{
|
||||
if(PlaceOfPartGood(constraintCoordinate, it->first->myLayers->m_test1.m_connections))
|
||||
if(PlaceOfPartGood(constraintCoordinate, it->first->m_test1.m_connections))
|
||||
continue;
|
||||
qVector.erase(it++);
|
||||
}
|
||||
@ -92,7 +92,7 @@ qualityVector AbstractionLayer_1::returnInBox(vector<Part>& PuzzleBox)
|
||||
int i=0;
|
||||
for(int col=1;col<m_constraintMatrix.size()-1;col++)
|
||||
for(int row=1;row<m_constraintMatrix[col].size()-1;row++)
|
||||
PuzzleBox[i++].myLayers->m_test1.m_connections=m_constraintMatrix[col][row].m_connections;
|
||||
PuzzleBox[i++].m_test1.m_connections=m_constraintMatrix[col][row].m_connections;
|
||||
|
||||
}
|
||||
|
||||
|
@ -17,4 +17,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif //SOURCE_ABSTRACTIONLAYER_1_PROPERTIES_H
|
||||
|
Reference in New Issue
Block a user