gameServer2/src/server/room.rs
author nemo
Tue, 21 Aug 2018 15:11:28 -0400
branch0.9.24
changeset 13682 f60b3998ba56
parent 13119 1e39b8749072
child 13416 cdf69667593b
permissions -rw-r--r--
only-stats should never create visual gears. and lua should never rely on visual gears being created. critical is just to help ensure ones important to gameplay don't get lost in fast-forward

pub type RoomId = usize;

pub struct HWRoom {
    pub id: RoomId,
    pub name: String,
    pub password: Option<String>,
    pub protocol_number: u32,
    pub ready_players_number: u8,
}

impl HWRoom {
    pub fn new(id: RoomId) -> HWRoom {
        HWRoom {
            id,
            name: String::new(),
            password: None,
            protocol_number: 0,
            ready_players_number: 0,
        }
    }
}