equal
deleted
inserted
replaced
152 cl <- thisClient |
152 cl <- thisClient |
153 chans <- roomClientsChans |
153 chans <- roomClientsChans |
154 return [ |
154 return [ |
155 ModifyClient (\c -> c{isReady = not $ isReady cl}), |
155 ModifyClient (\c -> c{isReady = not $ isReady cl}), |
156 ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}), |
156 ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}), |
157 AnswerClients chans [if isReady cl then "NOT_READY" else "READY", nick cl] |
157 AnswerClients chans ["CLIENT_FLAGS", if isReady cl then "-r" else "+r", nick cl] |
158 ] |
158 ] |
159 |
159 |
160 handleCmd_inRoom ["START_GAME"] = do |
160 handleCmd_inRoom ["START_GAME"] = do |
161 cl <- thisClient |
161 cl <- thisClient |
162 r <- thisRoom |
162 r <- thisRoom |