Tetris: use new API

This commit is contained in:
2021-04-29 13:25:55 +02:00
parent b52dee267b
commit 90dc26251b
5 changed files with 37 additions and 37 deletions
+1 -1
View File
@@ -279,7 +279,7 @@ std::shared_ptr< TetrisPiece > TetrisPiece::copySelf() {
auto ret = std::make_shared< TetrisPiece >();
for ( int i = 0; i < 4; i++ ) {
auto block = pieces[i]->copyInScene();
block->centerX();
block->setAlignment(SDLPP::OBJ_CENTER, SDLPP::OBJ_CENTER);
ret->addBlockInPos( block, pieces_rel_position[i] );
}
if ( !rotate_allowed )