gameServer/RoomsAndClients.hs
changeset 10215 26fc5502ba22
parent 8452 170afc3ac39f
child 10216 6928a323097f
--- a/gameServer/RoomsAndClients.hs	Mon Mar 24 21:32:24 2014 +0400
+++ b/gameServer/RoomsAndClients.hs	Thu Mar 27 23:25:31 2014 +0400
@@ -158,6 +158,9 @@
 allClientsM :: MRoomsAndClients r c -> IO [ClientIndex]
 allClientsM (MRoomsAndClients (_, clients)) = liftM (map ClientIndex) $ indicesM clients
 
+allRoomsM :: MRoomsAndClients r c -> IO [RoomIndex]
+allRoomsM (MRoomsAndClients (rooms, _)) = liftM (map RoomIndex) $ indicesM rooms
+
 clientsM :: MRoomsAndClients r c -> IO [c]
 clientsM (MRoomsAndClients (_, clients)) = indicesM clients >>= mapM (liftM client' . readElem clients)