bugfixes and design changes

This commit is contained in:
Baipyrus 2022-11-07 13:27:01 +01:00
parent 37394716ce
commit 0f77ff0194

View File

@ -516,11 +516,14 @@ namespace Tetris {
// Method to be called when the button for placing a block is pressed
public static void placeDownBlock() {
// Move block to the lowest possible point
while (!collisionCheck(player.x, ++player.y, player.positions)) { }
player.y--;
// Place the block
placeBlock();
if (!gameOver) {
// Move block to the lowest possible point
while (!collisionCheck(player.x, ++player.y, player.positions)) { }
player.y--;
// Place the block
placeBlock();
}
}
// Method to end the Game