gameServer/HWProtoInRoomState.hs
changeset 4917 8ff92bdc9f98
parent 4908 99d6797b7ff4
child 4931 da43c36a6e92
equal deleted inserted replaced
4916:33c1e9bc68ad 4917:8ff92bdc9f98
   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