Dispatcherprobleme bestehen
Springt momentan nicht in die nächste Reihe. Debugging gehört hier weiter gemacht.
This commit is contained in:
@ -39,7 +39,7 @@ void Puzzle::putIntoBox()
|
||||
for(int rotations=0;rotations<4;rotations++)
|
||||
{
|
||||
tmpPart.m_a1.shift(1);
|
||||
//TODO! add all other layers and rotationvariance here
|
||||
//TODO! add all other layerswith their rotaionvariance here
|
||||
myBox.emplace_back(tmpPart);
|
||||
|
||||
}
|
||||
@ -61,6 +61,12 @@ void Puzzle::removeConstrains(coor removeCoordinates)
|
||||
}
|
||||
void Puzzle::setConstraints(coor setConstraints, Part* constraintPiece)
|
||||
{
|
||||
//dp
|
||||
this->dp.m_constraintMatrix[setConstraints.col][setConstraints.row].DestructionArray.clear();
|
||||
for(auto it:this->tmp_destructionArray)
|
||||
this->dp.m_constraintMatrix[setConstraints.col][setConstraints.row].DestructionArray.emplace_back(it);
|
||||
|
||||
//a1
|
||||
this->a1.SetConstraintOnPosition(setConstraints,constraintPiece->m_a1);
|
||||
}
|
||||
|
||||
@ -98,3 +104,14 @@ bool Puzzle::allSet() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Puzzle::clearMat()
|
||||
{
|
||||
for(unsigned int i=0;i<cols;i++)
|
||||
{
|
||||
for(unsigned int j=0;j<rows;j++)
|
||||
{
|
||||
this->removeConstrains({i,j});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,14 @@ bool backtrack(vector<LogEntry>& log, Puzzle& puzzleMat)
|
||||
void calculateTrueDestructionPower(vector<LogEntry>& log, Puzzle& puzzleMat, float Layerworth) {
|
||||
float destructionPower = sqrt(
|
||||
Layerworth * puzzleMat.dp.m_constraintMatrix[0][0].SpeedTable[log.back().abstractionLevel+1]);
|
||||
puzzleMat.dp.setDestructionPower(log.back().myCoor, log.back().abstractionLevel, destructionPower);
|
||||
|
||||
//save destructionArray for when coor is done
|
||||
if(puzzleMat.tmp_destructionArray.empty())
|
||||
for(auto it:puzzleMat.dp.m_constraintMatrix[log.back().myCoor.col][log.back().myCoor.row].DestructionArray)
|
||||
puzzleMat.tmp_destructionArray.emplace_back(it);
|
||||
|
||||
puzzleMat.tmp_destructionArray[log.back().abstractionLevel]=destructionPower;
|
||||
|
||||
}
|
||||
|
||||
// PART RAUER_WEIDINGER
|
||||
|
Reference in New Issue
Block a user