change Position and Polynomio structs (less memory usage)
Some checks failed
Linux arm64 / Build (push) Failing after 2m9s
Some checks failed
Linux arm64 / Build (push) Failing after 2m9s
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user