--- a/gameServer/CoreTypes.hs Sat Oct 08 16:45:52 2011 +0200
+++ b/gameServer/CoreTypes.hs Sat Oct 08 16:54:56 2011 +0200
@@ -62,6 +62,24 @@
hedgehogs :: [HedgehogInfo]
}
deriving (Show, Read)
+
+data GameInfo =
+ GameInfo
+ {
+ roundMsgs :: Seq B.ByteString,
+ leftTeams :: [B.ByteString],
+ teamsAtStart :: [TeamInfo],
+ allPlayersHaveRegisteredAccounts :: Bool,
+ giMapParams :: Map.Map B.ByteString B.ByteString,
+ giParams :: Map.Map B.ByteString [B.ByteString]
+ } deriving (Show, Read)
+
+--newGameInfo :: -> GameInfo
+newGameInfo =
+ GameInfo
+ Data.Sequence.empty
+ []
+ []
data RoomInfo =
RoomInfo
@@ -71,14 +89,11 @@
password :: B.ByteString,
roomProto :: Word16,
teams :: [TeamInfo],
- gameinprogress :: Bool,
+ gameInfo :: Maybe GameInfo,
playersIn :: !Int,
readyPlayers :: !Int,
isRestrictedJoins :: Bool,
isRestrictedTeams :: Bool,
- roundMsgs :: Seq B.ByteString,
- leftTeams :: [B.ByteString],
- teamsAtStart :: [TeamInfo],
mapParams :: Map.Map B.ByteString B.ByteString,
params :: Map.Map B.ByteString [B.ByteString]
}
@@ -91,14 +106,11 @@
""
0
[]
- False
+ Nothing
0
0
False
False
- Data.Sequence.empty
- []
- []
(
Map.fromList $ Prelude.zipWith (,)
["MAP", "MAPGEN", "MAZE_SIZE", "SEED", "TEMPLATE"]