gameServer2/src/server/client.rs
author nemo
Sun, 29 Apr 2018 09:24:14 -0400
changeset 13347 e7b89e87a1b3
parent 13119 1e39b8749072
child 13419 81e0ed105f5d
permissions -rw-r--r--
Airmines should have been set for 45° bounce - the only reason they weren't I guess is they were a clone of some mine values - and mines use traditional behaviour.

pub type ClientId = usize;

pub struct HWClient {
    pub id: ClientId,
    pub room_id: Option<usize>,
    pub nick: String,
    pub protocol_number: u32,
    pub is_master: bool,
    pub is_ready: bool,
    pub is_joined_mid_game: bool,
}

impl HWClient {
    pub fn new(id: ClientId) -> HWClient {
        HWClient {
            id,
            room_id: None,
            nick: String::new(),
            protocol_number: 0,
            is_master: false,
            is_ready: false,
            is_joined_mid_game: false,
        }
    }
}