netserver/HWProto.hs
changeset 1632 b3fcd8a36124
parent 1621 d1ded2532d3f
child 1646 19b3784ac9d2
equal deleted inserted replaced
1631:6e313b3818ef 1632:b3fcd8a36124
   366 		newReadyPlayers = (readyPlayers clRoom) + if isReady client then -1 else 1
   366 		newReadyPlayers = (readyPlayers clRoom) + if isReady client then -1 else 1
   367 
   367 
   368 handleCmd_inRoom client _ rooms ["START_GAME"] =
   368 handleCmd_inRoom client _ rooms ["START_GAME"] =
   369 	if isMaster client && (playersIn clRoom == readyPlayers clRoom) && (not $ gameinprogress clRoom) then
   369 	if isMaster client && (playersIn clRoom == readyPlayers clRoom) && (not $ gameinprogress clRoom) then
   370 		if enoughClans then
   370 		if enoughClans then
   371 			(noChangeClients, modifyRoom clRoom{gameinprogress = True}, answerRunGame)
   371 			(noChangeClients, modifyRoom clRoom{gameinprogress = True, roundMsgs = []}, answerRunGame)
   372 		else
   372 		else
   373 			(noChangeClients, noChangeRooms, answerTooFewClans)
   373 			(noChangeClients, noChangeRooms, answerTooFewClans)
   374 	else
   374 	else
   375 		(noChangeClients, noChangeRooms, [])
   375 		(noChangeClients, noChangeRooms, [])
   376 	where
   376 	where