Moving. /JL

This commit is contained in:
2025-04-21 21:33:34 +02:00
parent a4a4b19d86
commit d5f9188865
3 changed files with 22 additions and 9 deletions

View File

@@ -1,12 +1,18 @@
import pygame
class DropZone():
def __init__(self, width, height):
self.dropzone = pygame.Surface((width, height))
def __init__(self, tile_size, width, height):
self.dropzone = pygame.Surface((width * tile_size, height * tile_size))
self.width = width
self.height = height
self.tile_size = tile_size
self.dropzone.fill((0, 0, 0)) # Fill with black
self.grid_row = [" "] * self.width
self.grid = [self.grid_row] * self.height
def draw(self, screen, tile_size):
screen.blit(self.dropzone, (tile_size * 4, tile_size * 1))
def draw(self, screen):
screen.blit(self.dropzone, (self.tile_size * 4, self.tile_size * 1))
def draw_brick(self, brick, location):
self.dropzone.blit(brick, (location[0] * self.tile_size, location[1] * self.tile_size))