gameServer/ServerState.hs
branchserver_refactor
changeset 4601 08ae94dd4c0d
parent 3807 7e4f7ed41790
child 4622 8bdc879ee6b2
equal deleted inserted replaced
4599:a9e4093a7e78 4601:08ae94dd4c0d
     3     module RoomsAndClients,
     3     module RoomsAndClients,
     4     clientRoomA,
     4     clientRoomA,
     5     ServerState(..),
     5     ServerState(..),
     6     client's,
     6     client's,
     7     allClientsS,
     7     allClientsS,
     8     roomClientsS
     8     roomClientsS,
       
     9     io
     9     ) where
    10     ) where
    10 
    11 
    11 import Control.Monad.State.Strict
    12 import Control.Monad.State.Strict
    12 import Data.Set as Set
    13 import Data.Set as Set
    13 ----------------------
    14 ----------------------
    39 
    40 
    40 roomClientsS :: RoomIndex -> StateT ServerState IO [ClientInfo]
    41 roomClientsS :: RoomIndex -> StateT ServerState IO [ClientInfo]
    41 roomClientsS ri = do
    42 roomClientsS ri = do
    42     rnc <- gets roomsClients
    43     rnc <- gets roomsClients
    43     liftIO $ roomClientsM rnc ri
    44     liftIO $ roomClientsM rnc ri
       
    45 
       
    46 io :: IO a -> StateT ServerState IO a
       
    47 io = liftIO