gameServer/Votes.hs
changeset 13509 f747c385b5ba
parent 13084 81c154fd4380
child 13701 d732ca5dcab9
equal deleted inserted replaced
13508:c5d7376fa58a 13509:f747c385b5ba
    26 import qualified Data.List as L
    26 import qualified Data.List as L
    27 import qualified Data.Map as Map
    27 import qualified Data.Map as Map
    28 import Data.Maybe
    28 import Data.Maybe
    29 import Control.Applicative
    29 import Control.Applicative
    30 -------------------
    30 -------------------
       
    31 import Consts
    31 import Utils
    32 import Utils
    32 import CoreTypes
    33 import CoreTypes
    33 import HandlerUtils
    34 import HandlerUtils
    34 import EngineInteraction
    35 import EngineInteraction
    35 
    36 
   116         rm <- thisRoom
   117         rm <- thisRoom
   117         chans <- roomClientsChans
   118         chans <- roomClientsChans
   118         let answers = concatMap (\t -> 
   119         let answers = concatMap (\t -> 
   119                 [ModifyRoom $ modifyTeam t{hhnum = h}
   120                 [ModifyRoom $ modifyTeam t{hhnum = h}
   120                 , AnswerClients chans ["HH_NUM", teamname t, showB h]]
   121                 , AnswerClients chans ["HH_NUM", teamname t, showB h]]
   121                 ) $ if length curteams * h > 48 then [] else curteams
   122                 ) $ if length curteams * h > cMaxHHs then [] else curteams
   122             ;
   123             ;
   123             curteams =
   124             curteams =
   124                 if isJust $ gameInfo rm then
   125                 if isJust $ gameInfo rm then
   125                     teamsAtStart . fromJust . gameInfo $ rm
   126                     teamsAtStart . fromJust . gameInfo $ rm
   126                 else
   127                 else