gameServer2/src/server/room.rs
changeset 13443 2501428303a2
parent 13428 c8425fbcf1d9
child 13477 f748a72432f2
equal deleted inserted replaced
13442:c6a3784ff2c1 13443:2501428303a2
    82 pub struct GameInfo {
    82 pub struct GameInfo {
    83     pub teams_in_game: u8,
    83     pub teams_in_game: u8,
    84     pub teams_at_start: Vec<(ClientId, TeamInfo)>,
    84     pub teams_at_start: Vec<(ClientId, TeamInfo)>,
    85     pub left_teams: Vec<String>,
    85     pub left_teams: Vec<String>,
    86     pub msg_log: Vec<String>,
    86     pub msg_log: Vec<String>,
    87     pub last_msg: Option<String>,
    87     pub sync_msg: Option<String>,
    88     pub is_paused: bool,
    88     pub is_paused: bool,
    89     config: RoomConfig
    89     config: RoomConfig
    90 }
    90 }
    91 
    91 
    92 impl GameInfo {
    92 impl GameInfo {
    93     fn new(teams: Vec<(ClientId, TeamInfo)>, config: RoomConfig) -> GameInfo {
    93     fn new(teams: Vec<(ClientId, TeamInfo)>, config: RoomConfig) -> GameInfo {
    94         GameInfo {
    94         GameInfo {
    95             left_teams: Vec::new(),
    95             left_teams: Vec::new(),
    96             msg_log: Vec::new(),
    96             msg_log: Vec::new(),
    97             last_msg: None,
    97             sync_msg: None,
    98             is_paused: false,
    98             is_paused: false,
    99             teams_in_game: teams.len() as u8,
    99             teams_in_game: teams.len() as u8,
   100             teams_at_start: teams,
   100             teams_at_start: teams,
   101             config
   101             config
   102         }
   102         }