gameServer/HWProtoInRoomState.hs
changeset 8422 ec41194d4444
parent 8421 fc39fe044a4f
child 8428 73ab5a17ee55
equal deleted inserted replaced
8421:fc39fe044a4f 8422:ec41194d4444
   232     let clTeams = map teamname . filter (\t -> teamowner t == nick cl) . teams $ rm
   232     let clTeams = map teamname . filter (\t -> teamowner t == nick cl) . teams $ rm
   233     let unsetInGameState = [AnswerClients chans ["CLIENT_FLAGS", "-g", nick cl], ModifyClient (\c -> c{isInGame = False})]
   233     let unsetInGameState = [AnswerClients chans ["CLIENT_FLAGS", "-g", nick cl], ModifyClient (\c -> c{isInGame = False})]
   234 
   234 
   235     if isInGame cl then
   235     if isInGame cl then
   236         if isJust $ gameInfo rm then
   236         if isJust $ gameInfo rm then
   237             if (isMaster cl && isCorrect) then
   237             return $ unsetInGameState ++ map SendTeamRemovalMessage clTeams
   238                 return $ FinishGame : unsetInGameState
       
   239                 else
       
   240                 return $ unsetInGameState ++ map SendTeamRemovalMessage clTeams
       
   241             else
   238             else
   242             return unsetInGameState
   239             return unsetInGameState
   243         else
   240         else
   244         return [] -- don't accept this message twice
   241         return [] -- don't accept this message twice
   245     where
   242     where