author | Wuzzy <Wuzzy2@mail.ru> |
Thu, 26 Jul 2018 14:18:23 +0200 | |
branch | 0.9.24 |
changeset 13557 | ea05d4b0b6b0 |
parent 13119 | 1e39b8749072 |
child 13416 | cdf69667593b |
permissions | -rw-r--r-- |
13119 | 1 |
pub type RoomId = usize; |
2 |
||
3 |
pub struct HWRoom { |
|
4 |
pub id: RoomId, |
|
5 |
pub name: String, |
|
6 |
pub password: Option<String>, |
|
7 |
pub protocol_number: u32, |
|
8 |
pub ready_players_number: u8, |
|
9 |
} |
|
10 |
||
11 |
impl HWRoom { |
|
12 |
pub fn new(id: RoomId) -> HWRoom { |
|
13 |
HWRoom { |
|
14 |
id, |
|
15 |
name: String::new(), |
|
16 |
password: None, |
|
17 |
protocol_number: 0, |
|
18 |
ready_players_number: 0, |
|
19 |
} |
|
20 |
} |
|
21 |
} |