gameServer/Actions.hs
branchserver_refactor
changeset 4573 7e3be7d7eeda
parent 4571 597440c80b8a
child 4579 4e61c2a42121
equal deleted inserted replaced
4571:597440c80b8a 4573:7e3be7d7eeda
   176 
   176 
   177 processAction (MoveToRoom ri) = do
   177 processAction (MoveToRoom ri) = do
   178     (Just ci) <- gets clientIndex
   178     (Just ci) <- gets clientIndex
   179     rnc <- gets roomsClients
   179     rnc <- gets roomsClients
   180     liftIO $ do
   180     liftIO $ do
   181         modifyClient rnc (\cl -> cl{teamsInGame = 0, isReady = false, isMaster = false}) ci
   181         modifyClient rnc (\cl -> cl{teamsInGame = 0, isReady = False, isMaster = False}) ci
   182         modifyRoom rnc (\r -> r{playersIn = (playersIn r) + 1}) ri
   182         modifyRoom rnc (\r -> r{playersIn = (playersIn r) + 1}) ri
   183 
   183 
   184     liftIO $ moveClientToRoom rnc ri ci
   184     liftIO $ moveClientToRoom rnc ri ci
   185 
   185 
   186     chans <- liftM (map sendChan) $ roomClientsS ri
   186     chans <- liftM (map sendChan) $ roomClientsS ri