game: add: support multiplayer

This commit is contained in:
2024-02-28 17:49:12 +01:00
committed by AdrienLSH
parent 8a4141351b
commit f9bb10f962
5 changed files with 26 additions and 19 deletions

View File

@ -29,9 +29,9 @@ class MatchMaking(WebsocketConsumer):
waiting_room: WaitingRoom = normal.get(self.mode)
waiting_room.append(Waiter(user.pk, self))
if (self.mode < 2):
if (self.mode < 2 or self.mode > 4):
data: dict = {
"detail": "The mode must be > 1.",
"detail": "The mode must be > 1 and < 4.",
}
self.send(json.dumps(data))
self.disconnect(1000)