feat: add collision logic between entities
This commit is contained in:
@@ -9,15 +9,8 @@ class Well(Entity):
|
||||
WIDTH = 10 # standard tetris well width, should not be changed
|
||||
HEIGHT = 20 # standard tetris well height, should not be changed
|
||||
|
||||
def __init__(self, position: Tuple):
|
||||
self.points = self.__get_points(position)
|
||||
|
||||
def draw(self, surface: pygame.Surface) -> None:
|
||||
well_color_hex = ConfigurationManager.configuration["color"]["border"] # TODO Should abstract out color call?
|
||||
well_color = pygame.Color(well_color_hex)
|
||||
|
||||
for sub_points in self.points:
|
||||
pygame.draw.polygon(surface, well_color, sub_points, 0)
|
||||
def __init__(self, position: Tuple, color):
|
||||
super().__init__(self.__get_points(position), color)
|
||||
|
||||
def __get_points(self, position: Tuple) -> List:
|
||||
tile_size = ConfigurationManager.configuration["engine"]["tile-size"]
|
||||
|
||||
Reference in New Issue
Block a user