gameServer/HWProtoLobbyState.hs
branchserver_refactor
changeset 4587 adf64662b6a8
parent 4571 597440c80b8a
child 4591 c91364bf6a69
equal deleted inserted replaced
4585:6e747aef012f 4587:adf64662b6a8
    88                 MoveToRoom jRI,
    88                 MoveToRoom jRI,
    89                 AnswerClients (map sendChan $ cl : jRoomClients) ["NOT_READY", nick cl],
    89                 AnswerClients (map sendChan $ cl : jRoomClients) ["NOT_READY", nick cl],
    90                 AnswerClients [sendChan cl] $ "JOINED" : map nick jRoomClients
    90                 AnswerClients [sendChan cl] $ "JOINED" : map nick jRoomClients
    91             ]
    91             ]
    92             ++ (map (readynessMessage cl) jRoomClients)
    92             ++ (map (readynessMessage cl) jRoomClients)
    93 
    93             ++ (answerFullConfig cl $ params jRoom)
    94     where
    94 
       
    95         where
    95         readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c]
    96         readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c]
       
    97 
       
    98         toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs
       
    99 
       
   100         answerFullConfig cl params = map (toAnswer cl) (leftConfigPart ++ rightConfigPart)
       
   101             where
       
   102             (leftConfigPart, rightConfigPart) = partition (\(p, _) -> p /= "MAP") $ Map.toList params
    96 
   103 
    97 
   104 
    98 
   105 
    99 {-
   106 {-
   100 
   107