gameServer2/src/server/room.rs
author nemo
Sun, 29 Apr 2018 09:24:14 -0400
changeset 13347 e7b89e87a1b3
parent 13119 1e39b8749072
child 13416 cdf69667593b
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.
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
}