generating "Random" Pieces from picture source now

rgb values stored as double in the piece base class. this is bound to change once other group has expanded piece base class.
This commit is contained in:
Raphael Maenle
2017-12-06 16:25:13 +01:00
parent cd7bc1c42a
commit 9b282e83ca
8 changed files with 100 additions and 73 deletions

View File

@@ -1,3 +1,5 @@
#include "../../header.h"
void status(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box, Puzzle& puzzleMat);
@@ -66,15 +68,6 @@ bool next(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box, Puzzle& puzzleMat)
return 1;
}
/*
coor calculateFirstCoor(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box, Puzzle& puzzleMat)
{
//returns coor of first piece
coor firstCoor(0,0);
return firstCoor;
}
*/
coor calculateNextCoor(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box, Puzzle& puzzleMat)
{
//level 1:
@@ -135,10 +128,10 @@ void abstractionlayer1solver(vector<LogEntry>& log, vector<PuzzlePiece*>& p_Box,
log.back().PieceCollector.erase(log.back().PieceCollector.begin()+i);
else
{
i++; //otherwise loop stops before end!
//set shift to 0 so that we have a defined starting position for all pieces
while(log.back().PieceCollector[i]->getShift())
log.back().PieceCollector[i]->shift(1);
i++; //otherwise loop stops before end!
}
}
}