gameServer/Actions.hs
changeset 2345 daf1785f2337
parent 2343 3ab763dc14a3
child 2346 f07fd1ac2c48
equal deleted inserted replaced
2344:63b3da03ce46 2345:daf1785f2337
   231 				clID,
   231 				clID,
   232 				serverInfo,
   232 				serverInfo,
   233 				adjust (\cl -> cl{isMaster = True}) newMasterId clients,
   233 				adjust (\cl -> cl{isMaster = True}) newMasterId clients,
   234 				adjust (\r -> r{name = newRoomName}) rID rooms
   234 				adjust (\r -> r{name = newRoomName}) rID rooms
   235 				)
   235 				)
   236 		newRoomName = "abandoned"
   236 		newRoomName = nick newMasterClient
   237 		otherPlayersSet = IntSet.delete clID (playersIDs room)
   237 		otherPlayersSet = IntSet.delete clID (playersIDs room)
   238 		newMasterId = IntSet.findMin otherPlayersSet
   238 		newMasterId = IntSet.findMin otherPlayersSet
       
   239 		newMasterClient = clients ! newMasterId
   239 
   240 
   240 
   241 
   241 processAction (clID, serverInfo, clients, rooms) (AddRoom roomName roomPassword) = do
   242 processAction (clID, serverInfo, clients, rooms) (AddRoom roomName roomPassword) = do
   242 	let newServerInfo = serverInfo {nextRoomID = newID}
   243 	let newServerInfo = serverInfo {nextRoomID = newID}
   243 	let room = newRoom{
   244 	let room = newRoom{