equal
deleted
inserted
replaced
50 rm <- thisRoom |
50 rm <- thisRoom |
51 clNick <- clientNick |
51 clNick <- clientNick |
52 clChan <- thisClientChans |
52 clChan <- thisClientChans |
53 othChans <- roomOthersChans |
53 othChans <- roomOthersChans |
54 return $ |
54 return $ |
55 if not . null . drop 5 $ teams rm then |
55 if not . null . drop (maxTeams rm - 1) $ teams rm then |
56 [Warning "too many teams"] |
56 [Warning "too many teams"] |
57 else if canAddNumber rm <= 0 then |
57 else if canAddNumber rm <= 0 then |
58 [Warning "too many hedgehogs"] |
58 [Warning "too many hedgehogs"] |
59 else if isJust $ findTeam rm then |
59 else if isJust $ findTeam rm then |
60 [Warning "There's already a team with same name in the list"] |
60 [Warning "There's already a team with same name in the list"] |
76 dif = readInt_ difStr |
76 dif = readInt_ difStr |
77 hhsList [] = [] |
77 hhsList [] = [] |
78 hhsList [_] = error "Hedgehogs list with odd elements number" |
78 hhsList [_] = error "Hedgehogs list with odd elements number" |
79 hhsList (n:h:hhs) = HedgehogInfo n h : hhsList hhs |
79 hhsList (n:h:hhs) = HedgehogInfo n h : hhsList hhs |
80 newTeamHHNum r = min 4 (canAddNumber r) |
80 newTeamHHNum r = min 4 (canAddNumber r) |
|
81 maxTeams r |
|
82 | roomProto r < 38 = 6 |
|
83 | otherwise = 8 |
|
84 |
81 |
85 |
82 handleCmd_inRoom ["REMOVE_TEAM", tName] = do |
86 handleCmd_inRoom ["REMOVE_TEAM", tName] = do |
83 (ci, _) <- ask |
87 (ci, _) <- ask |
84 r <- thisRoom |
88 r <- thisRoom |
85 clNick <- clientNick |
89 clNick <- clientNick |