--- a/gameServer/HWProtoLobbyState.hs Tue Jan 25 22:13:34 2011 +0300
+++ b/gameServer/HWProtoLobbyState.hs Tue Jan 25 22:23:08 2011 +0300
@@ -90,10 +90,17 @@
AnswerClients [sendChan cl] $ "JOINED" : map nick jRoomClients
]
++ (map (readynessMessage cl) jRoomClients)
+ ++ (answerFullConfig cl $ params jRoom)
- where
+ where
readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c]
+ toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs
+
+ answerFullConfig cl params = map (toAnswer cl) (leftConfigPart ++ rightConfigPart)
+ where
+ (leftConfigPart, rightConfigPart) = partition (\(p, _) -> p /= "MAP") $ Map.toList params
+
{-