19 lines
441 B
Python
19 lines
441 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)
|