diff -r 3c578f531cc1 -r 2c72fe81dd37 gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Fri Sep 23 09:58:41 2011 +0200 +++ b/gameServer/CoreTypes.hs Sat Sep 24 00:00:57 2011 +0400 @@ -62,6 +62,22 @@ hedgehogs :: [HedgehogInfo] } deriving (Show, Read) + +data GameInfo = + GameInfo + { + roundMsgs :: Seq B.ByteString, + leftTeams :: [B.ByteString], + teamsAtStart :: [TeamInfo], + allPlayersHaveRegisteredAccounts :: Bool + } + +newGameInfo :: Bool -> GameInfo +newGameInfo = + GameInfo + Data.Sequence.empty + [] + [] data RoomInfo = RoomInfo @@ -71,14 +87,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 +104,11 @@ "" 0 [] - False + Nothing 0 0 False False - Data.Sequence.empty - [] - [] ( Map.fromList $ Prelude.zipWith (,) ["MAP", "MAPGEN", "MAZE_SIZE", "SEED", "TEMPLATE"]