gameServer/Votes.hs
changeset 10879 9bedbd36de49
parent 10787 50a4cdeedb44
child 10880 bf64f1bef1cc
equal deleted inserted replaced
10878:963bc20f511c 10879:9bedbd36de49
   115         rm <- thisRoom
   115         rm <- thisRoom
   116         chans <- roomClientsChans
   116         chans <- roomClientsChans
   117         let answers = concatMap (\t -> 
   117         let answers = concatMap (\t -> 
   118                 [ModifyRoom $ modifyTeam t{hhnum = h}
   118                 [ModifyRoom $ modifyTeam t{hhnum = h}
   119                 , AnswerClients chans ["HH_NUM", teamname t, showB h]]
   119                 , AnswerClients chans ["HH_NUM", teamname t, showB h]]
   120                 )
   120                 ) $ if length curteams * h > 48 then [] else curteams
   121                 $
   121             ;
       
   122             curteams =
   122                 if isJust $ gameInfo rm then
   123                 if isJust $ gameInfo rm then
   123                     teamsAtStart . fromJust . gameInfo $ rm 
   124                     teamsAtStart . fromJust . gameInfo $ rm
   124                 else
   125                 else
   125                     teams rm
   126                     teams rm
   126 
   127 
   127         return $ ModifyRoom (\r -> r{defaultHedgehogsNumber = h}) : answers
   128         return $ ModifyRoom (\r -> r{defaultHedgehogsNumber = h}) : answers
   128 
   129