feat: add collision logic between entities

This commit is contained in:
Giovani Rodriguez
2021-06-08 14:02:23 -04:00
parent 2759b2f293
commit 4f4ac44b02
5 changed files with 45 additions and 42 deletions

View File

@@ -16,7 +16,9 @@ class PieceGenerator:
if len(cls.__bucket) == 0:
cls.__generate_bucket()
return Piece(cls.__get_piece_shape(cls.__bucket.pop()), position, cls.__get_piece_color())
border_color = ConfigurationManager.configuration["color"]["border"] # TODO abstract color call to config out?
return Piece(cls.__get_piece_shape(cls.__bucket.pop()), position, cls.__get_piece_color(), border_color)
@classmethod
def __generate_bucket(cls) -> None: