Rotation is now working. /JL

This commit is contained in:
2025-04-25 17:12:10 +02:00
parent 5cbbf9bdcb
commit 3b76f02f92
5 changed files with 57 additions and 44 deletions

View File

@@ -1,18 +1,17 @@
import pygame
from globals import TILE_SIZE, grid
import globals
from enums import BrickColor
class DropZone():
def __init__(self, width, height):
self.dropzone = pygame.Surface((width * TILE_SIZE, height * TILE_SIZE))
self.dropzone = pygame.Surface((width * globals.TILE_SIZE, height * globals.TILE_SIZE))
self.width = width
self.height = height
self.grid_row = [" "] * self.width
grid = [self.grid_row] * self.height
print(globals.dropgrid)
def draw(self, screen):
screen.blit(self.dropzone, (TILE_SIZE * 4, TILE_SIZE * 1))
screen.blit(self.dropzone, (globals.TILE_SIZE * 4, globals.TILE_SIZE * 1))
def draw_brick(self, brick, location):
self.dropzone.fill(BrickColor.Black.value)
self.dropzone.blit(brick, (location[0] * TILE_SIZE, location[1] * TILE_SIZE))
self.dropzone.blit(brick, (location[0] * globals.TILE_SIZE, location[1] * globals.TILE_SIZE))