gameServer2/src/server/room.rs
author Wuzzy <Wuzzy2@mail.ru>
Mon, 12 Mar 2018 02:09:21 +0100
changeset 13169 6869d27a2f3f
parent 13119 1e39b8749072
child 13416 cdf69667593b
permissions -rw-r--r--
ACF7: Add one pick hammer in crate Players often reported to screw up with the pick hammer, which is quite annoying. With one pick hammer more, this mission should be slightly less annoying.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13119
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
     1
pub type RoomId = usize;
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
     2
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
     3
pub struct HWRoom {
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
     4
    pub id: RoomId,
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
     5
    pub name: String,
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
     6
    pub password: Option<String>,
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
     7
    pub protocol_number: u32,
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
     8
    pub ready_players_number: u8,
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
     9
}
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    10
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    11
impl HWRoom {
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    12
    pub fn new(id: RoomId) -> HWRoom {
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    13
        HWRoom {
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    14
            id,
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    15
            name: String::new(),
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    16
            password: None,
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    17
            protocol_number: 0,
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    18
            ready_players_number: 0,
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    19
        }
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    20
    }
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents:
diff changeset
    21
}