mirror of
https://github.com/kristoferssolo/Tetris.git
synced 2025-10-21 20:00:35 +00:00
14 lines
373 B
Python
14 lines
373 B
Python
import pygame
|
|
from utils import CONFIG, Position, Size
|
|
|
|
|
|
class Block(pygame.sprite.Sprite):
|
|
def __init__(
|
|
self, /, *, group: pygame.sprite.Group, pos: Position, color: str
|
|
) -> None:
|
|
super().__init__(group)
|
|
self.image = pygame.Surface(CONFIG.game.cell)
|
|
self.image.fill(color)
|
|
|
|
self.rect = self.image.get_rect(topleft=(0, 0))
|