wip: add multiplayer screen

This commit is contained in:
Giovani
2021-07-09 09:13:14 -04:00
parent 1c65709542
commit 6f14aa0645
3 changed files with 16 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ from tetri5.util import SoundManager
from tetri5.entity import Well
from tetri5.entity import Stack
from tetri5.entity import PieceGenerator
from tetri5.online import MultiplayerService
"""
TODO
@@ -71,7 +72,7 @@ class TitleScene(Scene):
self._cursor_off = not self._cursor_off
if Controller.key_pressed(pygame.K_RETURN):
self._change_scence(SinglePlayerScene(self._change_scence)) # TODO implement multiplayer
self._change_scence(SinglePlayerScene(self._change_scence) if not self._is_multiplayer else MultiPlayerScene(self._change_scence))
"""
TODO
@@ -166,4 +167,14 @@ class SinglePlayerScene(Scene):
TODO
"""
class MultiPlayerScene(Scene):
pass
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"))
MultiplayerService.init()
def draw(self, surface: pygame.Surface) -> None:
surface.fill(self._background_color)
def update(self, elapsed_time: int) -> None:
pass