Merge remote-tracking branch 'refs/remotes/origin/server' into server
This commit is contained in:
commit
1d751b00ed
@ -40,7 +40,7 @@ class AbstractRoom:
|
|||||||
member.disconnect()
|
member.disconnect()
|
||||||
|
|
||||||
def empty(self):
|
def empty(self):
|
||||||
for _ in self._member_list:
|
for _ in self._waiter_list:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -5,8 +5,14 @@ class AbstractRoomManager:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._room_list: [AbstractRoom] = []
|
self._room_list: [AbstractRoom] = []
|
||||||
|
|
||||||
def append(self, room: AbstractRoom):
|
def get(self, mode: int):
|
||||||
self._room_list.append(room)
|
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, room: AbstractRoom):
|
def remove(self, waiting_room: WaitingRoom):
|
||||||
self._room_list.remove(room)
|
self._waiting_rooms.remove(waiting_room)
|
||||||
|
Loading…
Reference in New Issue
Block a user