feat: add piece color to the stack

This commit is contained in:
Giovani
2021-07-12 19:33:19 -04:00
parent 9cf6c7def5
commit 90c397b093
3 changed files with 68 additions and 15 deletions

View File

@@ -102,8 +102,7 @@ class SinglePlayerScene(Scene):
self._well = Well(ConfigurationManager.get("position", "well"),\
ConfigurationManager.get("color", "well-1"),\
ConfigurationManager.get("color", "well-border-1"))
self._stack = Stack(ConfigurationManager.get("color", "stack-1"),\
ConfigurationManager.get("color", "stack-border-1"))
self._stack = Stack()
self._change_scence = change_scene
SoundManager.play_theme_music()
@@ -171,10 +170,27 @@ class MultiPlayerScene(Scene):
def __init__(self, change_scene: FunctionType) -> None:
self._tile_size = ConfigurationManager.get("engine", "tile-size")
self._background_color = pygame.Color(ConfigurationManager.get("color", "window-bg"))
self._well_player_one = Well(ConfigurationManager.get("position", "well-player-1"),\
ConfigurationManager.get("color", "well-1"),\
ConfigurationManager.get("color", "well-border-1"))
self._well_player_two = Well(ConfigurationManager.get("position", "well-player-2"),\
ConfigurationManager.get("color", "well-1"),\
ConfigurationManager.get("color", "well-border-1"))
self._stack = Stack()
MultiplayerService.init()
def draw(self, surface: pygame.Surface) -> None:
surface.fill(self._background_color)
if self._well_player_one:
self._well_player_one.draw(surface)
if self._well_player_two:
self._well_player_two.draw(surface)
if self._stack:
self._stack.draw(surface)
def update(self, elapsed_time: int) -> None:
pass