gameServer/CoreTypes.hs
changeset 3947 709fdb89f76c
parent 3901 124b4755914b
child 4242 5e3c5fe2cb14
equal deleted inserted replaced
3946:41e06b74c991 3947:709fdb89f76c
    76         roomProto :: Word16,
    76         roomProto :: Word16,
    77         teams :: [TeamInfo],
    77         teams :: [TeamInfo],
    78         gameinprogress :: Bool,
    78         gameinprogress :: Bool,
    79         playersIn :: !Int,
    79         playersIn :: !Int,
    80         readyPlayers :: !Int,
    80         readyPlayers :: !Int,
    81         playersIDs :: IntSet.IntSet,
       
    82         isRestrictedJoins :: Bool,
    81         isRestrictedJoins :: Bool,
    83         isRestrictedTeams :: Bool,
    82         isRestrictedTeams :: Bool,
    84         roundMsgs :: Seq B.ByteString,
    83         roundMsgs :: Seq B.ByteString,
    85         leftTeams :: [B.ByteString],
    84         leftTeams :: [B.ByteString],
    86         teamsAtStart :: [TeamInfo],
    85         teamsAtStart :: [TeamInfo],
    87         params :: Map.Map B.ByteString [B.ByteString]
    86         params :: Map.Map B.ByteString [B.ByteString]
    88     }
    87     }
    89 
    88 
    90 instance Show RoomInfo where
    89 instance Show RoomInfo where
    91     show ri = ", players ids: " ++ show (IntSet.size $ playersIDs ri)
    90     show ri = ", players: " ++ show (playersIn ri)
    92             ++ ", players: " ++ show (playersIn ri)
       
    93             ++ ", ready: " ++ show (readyPlayers ri)
    91             ++ ", ready: " ++ show (readyPlayers ri)
    94             ++ ", teams: " ++ show (teams ri)
    92             ++ ", teams: " ++ show (teams ri)
    95 
    93 
    96 newRoom :: RoomInfo
    94 newRoom :: RoomInfo
    97 newRoom = (
    95 newRoom = (
   102         0
   100         0
   103         []
   101         []
   104         False
   102         False
   105         0
   103         0
   106         0
   104         0
   107         IntSet.empty
       
   108         False
   105         False
   109         False
   106         False
   110         Data.Sequence.empty
   107         Data.Sequence.empty
   111         []
   108         []
   112         []
   109         []