refactor: move logic in main to its on class

This commit is contained in:
Giovani Rodriguez
2021-06-06 19:05:36 -04:00
parent a79f2be998
commit fece1cf5bc
3 changed files with 91 additions and 60 deletions

View File

@@ -15,7 +15,7 @@ class Piece: # TODO game objects base class / interface?
def draw(self, surface):
tile_size = ConfigurationManager.configuration["engine"]["tile-size"]
hex_color = ConfigurationManager.configuration["color"]["border"] # TODO Should abstract out color call?
hex_color = ConfigurationManager.configuration["color"]["border"] # TODO should abstract out color call?
base_color = pygame.Color(self.color)
border_color = pygame.Color(hex_color)
@@ -46,6 +46,9 @@ class Piece: # TODO game objects base class / interface?
point[0] = (k * -1) + self.center[0]
point[1] = h + self.center[1]
def colliding(object):
pass
def __get_points(self, shape, position):
tile_size = ConfigurationManager.configuration["engine"]["tile-size"]