18 lines
440 B
Python
18 lines
440 B
Python
from .AbstractRoom import AbstractRoom
|
|
|
|
class AbstractRoomManager:
|
|
|
|
def __init__(self):
|
|
self._room_list: [AbstractRoom] = []
|
|
|
|
def get(self, mode: int):
|
|
for room in self._room_list:
|
|
room: A
|
|
if (waiting_room._mode == mode):
|
|
return waiting_room
|
|
tmp: WaitingRoom = WaitingRoom(self, mode)
|
|
self._waiting_rooms.append(tmp)
|
|
return tmp
|
|
|
|
def remove(self, waiting_room: WaitingRoom):
|
|
self._waiting_rooms.remove(waiting_room) |