ff windaube veut toujours pas
All checks were successful
Linux arm64 / Build (push) Successful in 2m45s

This commit is contained in:
2025-06-12 17:35:39 +02:00
parent d7f52239f0
commit dd8314f76c
7 changed files with 26 additions and 23 deletions

View File

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