Initial commit

This commit is contained in:
SolidLiquid
2025-06-05 20:15:38 +12:00
commit fa1cc5035e
16 changed files with 581 additions and 0 deletions

17
util/room/registry.py Normal file
View File

@@ -0,0 +1,17 @@
from util.room.data import Room
class RoomRegistry:
def __init__(self):
self.rooms: dict[str, Room] = {}
def create_room(self, code: str, password: str = None) -> Room:
room = Room(code=code, password=password)
self.rooms[code] = room
return room
def get_room(self, code: str) -> Room:
return self.rooms.get(code)
def delete_room(self, code: str):
if code in self.rooms:
del self.rooms[code]