equal
deleted
inserted
replaced
111 ++ answerFullConfig cl jRoom |
111 ++ answerFullConfig cl jRoom |
112 ++ answerTeams cl jRoom |
112 ++ answerTeams cl jRoom |
113 ++ watchRound cl jRoom chans |
113 ++ watchRound cl jRoom chans |
114 ++ [AnswerClients [sendChan cl] ["CHAT", "[greeting]", greeting jRoom] | greeting jRoom /= ""] |
114 ++ [AnswerClients [sendChan cl] ["CHAT", "[greeting]", greeting jRoom] | greeting jRoom /= ""] |
115 ++ map (\t -> AnswerClients chans ["EM", toEngineMsg $ 'G' `B.cons` t]) clTeams |
115 ++ map (\t -> AnswerClients chans ["EM", toEngineMsg $ 'G' `B.cons` t]) clTeams |
|
116 ++ [AnswerClients [sendChan cl] ["EM", toEngineMsg "I"] | isPaused `fmap` gameInfo jRoom == Just True] |
116 |
117 |
117 where |
118 where |
118 moveTeams :: [B.ByteString] -> GameInfo -> ([TeamInfo], GameInfo) |
119 moveTeams :: [B.ByteString] -> GameInfo -> ([TeamInfo], GameInfo) |
119 moveTeams cts g = (deleteFirstsBy2 (\a b -> teamname a == b) (teamsAtStart g) (leftTeams g \\ cts) |
120 moveTeams cts g = (deleteFirstsBy2 (\a b -> teamname a == b) (teamsAtStart g) (leftTeams g \\ cts) |
120 , g{leftTeams = leftTeams g \\ cts, rejoinedTeams = rejoinedTeams g ++ cts, teamsInGameNumber = teamsInGameNumber g + length cts}) |
121 , g{leftTeams = leftTeams g \\ cts, rejoinedTeams = rejoinedTeams g ++ cts, teamsInGameNumber = teamsInGameNumber g + length cts}) |