ff windaube veut toujours pas
All checks were successful
Linux arm64 / Build (push) Successful in 2m45s
All checks were successful
Linux arm64 / Build (push) Successful in 2m45s
This commit is contained in:
@@ -48,7 +48,9 @@ bool PiecesFiles::savePieces(int polyominoSize, std::vector<Polyomino>& polyomin
|
||||
|
||||
for (const Polyomino& polyomino : polyominoes) {
|
||||
// write the characteristics of the piece
|
||||
char infoByte = (polyomino.isConvex() << 7) + (polyomino.hasHole() << 6) + polyomino.getLength();
|
||||
bool isConvex = polyomino.isConvex();
|
||||
bool hasHole = (isConvex) ? false : polyomino.hasHole();
|
||||
char infoByte = (isConvex << 7) + (hasHole << 6) + polyomino.getLength();
|
||||
piecesFile.write(&infoByte, 1);
|
||||
|
||||
// write the positions of the piece
|
||||
|
||||
Reference in New Issue
Block a user