equal
deleted
inserted
replaced
109 else |
109 else |
110 [RemoveTeam tName, |
110 [RemoveTeam tName, |
111 ModifyClient |
111 ModifyClient |
112 (\c -> c{ |
112 (\c -> c{ |
113 teamsInGame = teamsInGame c - 1, |
113 teamsInGame = teamsInGame c - 1, |
114 clientClan = if teamsInGame c == 1 then Nothing else Just $ anotherTeamClan ci r |
114 clientClan = if teamsInGame c == 1 then Nothing else Just $ anotherTeamClan ci team r |
115 }) |
115 }) |
116 ] |
116 ] |
117 where |
117 where |
118 anotherTeamClan ci = teamcolor . fromJust . find (\t -> (teamownerId t == ci) && (t /= team)) . teams |
118 anotherTeamClan ci team = teamcolor . fromMaybe (error "CHECKPOINT 011") . find (\t -> (teamownerId t == ci) && (t /= team)) . teams |
119 findTeam = find (\t -> tName == teamname t) . teams |
119 findTeam = find (\t -> tName == teamname t) . teams |
120 |
120 |
121 |
121 |
122 handleCmd_inRoom ["HH_NUM", teamName, numberStr] = do |
122 handleCmd_inRoom ["HH_NUM", teamName, numberStr] = do |
123 cl <- thisClient |
123 cl <- thisClient |