gamegrid, falling, Tetrominos, collision and deleting rows, GUI Menus and Score

This commit is contained in:
IM23a-bachmannj2
2024-12-10 21:13:01 +01:00
parent 3eb8af9991
commit 6de87ac002
4 changed files with 156 additions and 40 deletions
+6 -1
View File
@@ -54,4 +54,9 @@ class Tetrominos:
def move(self, dx, dy):
"""Move the tetromino."""
self.x += dx
self.y += dy
self.y += dy
def instant_drop(self, grid):
"""Move the tetromino to the lowest possible position."""
while not grid.check_collision(self.shape, self.x, self.y + 1):
self.y += 1