equal
deleted
inserted
replaced
2 {-# OPTIONS_GHC -fno-warn-orphans #-} |
2 {-# OPTIONS_GHC -fno-warn-orphans #-} |
3 module Actions where |
3 module Actions where |
4 |
4 |
5 import Control.Concurrent |
5 import Control.Concurrent |
6 import qualified Data.Set as Set |
6 import qualified Data.Set as Set |
7 import qualified Data.Sequence as Seq |
|
8 import qualified Data.List as L |
7 import qualified Data.List as L |
9 import qualified Control.Exception as Exception |
8 import qualified Control.Exception as Exception |
10 import System.Log.Logger |
9 import System.Log.Logger |
11 import Control.Monad |
10 import Control.Monad |
12 import Data.Time |
11 import Data.Time |
372 mapM_ processAction [ |
371 mapM_ processAction [ |
373 AnswerClients chans ["EM", rmTeamMsg], |
372 AnswerClients chans ["EM", rmTeamMsg], |
374 ModifyRoom (\r -> r{ |
373 ModifyRoom (\r -> r{ |
375 gameInfo = liftM (\g -> g{ |
374 gameInfo = liftM (\g -> g{ |
376 teamsInGameNumber = teamsInGameNumber g - 1 |
375 teamsInGameNumber = teamsInGameNumber g - 1 |
377 , roundMsgs = roundMsgs g Seq.|> rmTeamMsg |
376 , roundMsgs = rmTeamMsg : roundMsgs g |
378 }) $ gameInfo r |
377 }) $ gameInfo r |
379 }) |
378 }) |
380 ] |
379 ] |
381 |
380 |
382 rnc <- gets roomsClients |
381 rnc <- gets roomsClients |