From 8a72d381c8c6d1f55cd94c7ddf4b34f4e08c1db4 Mon Sep 17 00:00:00 2001 From: Giovani Rodriguez Date: Tue, 6 Jul 2021 13:57:43 -0400 Subject: [PATCH] feat: add exit game server message --- tetris/online.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tetris/online.py b/tetris/online.py index 3f0ae8f..5774037 100644 --- a/tetris/online.py +++ b/tetris/online.py @@ -114,6 +114,9 @@ class _NetworkConnectionService(): if data["type"] == "receive_piece": print("Receive a piece!") MultiplayerService._receive_piece_queue.put(PieceDto.create(data["piece"])) + if data["type"] == "exit_game": + print("Exit the game!") + cls.close_connection() cls._pending_receive_task = None elif len(pending):