feat: add piece color to the stack
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user