From f9bf3a566e46511d28f03780abf5ef0588da1e91 Mon Sep 17 00:00:00 2001 From: starnakin Date: Sat, 23 Dec 2023 16:58:03 +0100 Subject: [PATCH] matchmaking: add: players counter in room --- matchmaking/consumers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/matchmaking/consumers.py b/matchmaking/consumers.py index f47d73d..791d6ef 100644 --- a/matchmaking/consumers.py +++ b/matchmaking/consumers.py @@ -28,8 +28,7 @@ class MatchMaking(WebsocketConsumer): waiting_room: WaitingRoom = normal.get(self.mode) waiting_room.append(Waiter(user.pk, self)) - - print(len(waiting_room), "/", self.mode, [len(waiting_room),self.mode]) + waiting_room.broadcast(f"{len(waiting_room)} / {waiting_room._mode}") if (len(waiting_room) == self.mode): game_id: int = GameModel().create(waiting_room.get_users_id()) waiting_room.broadcast("game_found", {"game_id": game_id})