change Position and Polynomio structs (less memory usage)
Some checks failed
Linux arm64 / Build (push) Failing after 2m9s

This commit is contained in:
2025-07-19 20:50:36 +02:00
parent 161c9425ae
commit d5b51213c8
10 changed files with 64 additions and 64 deletions

View File

@@ -117,7 +117,7 @@ void GamePlayingAppMenu::drawFrame() const {
// board
for (int y = this->game.getBoard().getBaseHeight() + 9; y >= 0; y--) {
for (int x = 0; x < this->game.getBoard().getWidth(); x++) {
Block block = this->game.getBoard().getBlock(Position{x, y});
Block block = this->game.getBoard().getBlock(Position(x, y));
if (isBoardInvisible) block = NOTHING;
sf::RectangleShape cell(cellSize);
@@ -196,7 +196,7 @@ void GamePlayingAppMenu::drawFrame() const {
for (int y = 0; y < this->game.getNextPieces().at(i).getLength(); y++) {
for (int x = 0; x < this->game.getNextPieces().at(i).getLength(); x++) {
sf::RectangleShape cell(nextCellSize);
if (this->game.getNextPieces().at(i).getPositions().contains(Position{x, y})) {
if (this->game.getNextPieces().at(i).getPositions().contains(Position(x, y))) {
cell.setFillColor(pieceColor);
lowestRank = y;
}
@@ -223,7 +223,7 @@ void GamePlayingAppMenu::drawFrame() const {
for (int y = 0; y < this->game.getHeldPiece()->getLength(); y++) {
for (int x = 0; x < this->game.getHeldPiece()->getLength(); x++) {
sf::RectangleShape cell(holdCellSize);
if (this->game.getHeldPiece()->getPositions().contains(Position{x, y})) {
if (this->game.getHeldPiece()->getPositions().contains(Position(x, y))) {
cell.setFillColor(color);
}
else {