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

@ -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;
}

View File

@ -17,4 +17,7 @@ private:
};
#endif //SOURCE_ABSTRACTIONLAYER_1_PROPERTIES_H