equal
deleted
inserted
replaced
81 |
81 |
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: String, |
86 pub msg_log: Vec<String>, |
87 pub last_msg: Option<String>, |
87 pub last_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: String::new(), |
96 msg_log: Vec::new(), |
97 last_msg: None, |
97 last_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 |