Refactoring to use numpy. /JL

This commit is contained in:
2025-05-04 20:56:01 +02:00
parent 431dfcc4d7
commit c443df22ef
6 changed files with 154 additions and 19 deletions

View File

@@ -75,7 +75,7 @@ class Brick:
if new_x <= 0 or new_x >= globals.GRID_WIDTH or new_y >= globals.GRID_HEIGHT:
print(f"Collision X:{new_x}, Y:{new_y}")
return True
if new_y >= 0 and globals.dropgrid[new_y][new_x]:
if new_y >= 0 and globals.grid[new_y][new_x]:
return True
return False