bugfixes and design changes
This commit is contained in:
parent
37394716ce
commit
0f77ff0194
13
Tetris.cs
13
Tetris.cs
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user