gameServer/HWProtoInRoomState.hs
changeset 8541 0cd63b963330
parent 8531 5e7f01d78ab0
child 8550 17378d33e62e
equal deleted inserted replaced
8539:49e657b77499 8541:0cd63b963330
    75             else
    75             else
    76                 [ModifyRoom (\r -> r{teams = teams r ++ [newTeam]}),
    76                 [ModifyRoom (\r -> r{teams = teams r ++ [newTeam]}),
    77                 SendUpdateOnThisRoom,
    77                 SendUpdateOnThisRoom,
    78                 ModifyClient (\c -> c{teamsInGame = teamsInGame c + 1, clientClan = Just teamColor}),
    78                 ModifyClient (\c -> c{teamsInGame = teamsInGame c + 1, clientClan = Just teamColor}),
    79                 AnswerClients clChan ["TEAM_ACCEPTED", tName],
    79                 AnswerClients clChan ["TEAM_ACCEPTED", tName],
    80                 AnswerClients othChans $ teamToNet $ newTeam,
       
    81                 AnswerClients roomChans ["TEAM_COLOR", tName, teamColor],
       
    82                 ModifyClient $ \c -> c{actionsPending = actionsPending cl
    80                 ModifyClient $ \c -> c{actionsPending = actionsPending cl
    83                     ++ [AnswerClients clChan ["HH_NUM", tName, showB $ hhnum newTeam]]},
    81                     ++ [AnswerClients clChan ["HH_NUM", tName, showB $ hhnum newTeam]
       
    82                         , AnswerClients othChans $ teamToNet $ newTeam
       
    83                         , AnswerClients roomChans ["TEAM_COLOR", tName, teamColor]
       
    84                     ]},
    84                 AnswerClients [sendChan cl] ["PING"]
    85                 AnswerClients [sendChan cl] ["PING"]
    85                 ]
    86                 ]
    86         where
    87         where
    87         canAddNumber rt = (48::Int) - (sum $ map hhnum rt)
    88         canAddNumber rt = (48::Int) - (sum $ map hhnum rt)
    88         findTeam = find (\t -> tName == teamname t) . teams
    89         findTeam = find (\t -> tName == teamname t) . teams