Struct rust_warrior::floor::Floor [−][src]
pub struct Floor {
pub level: usize,
pub width: usize,
pub height: usize,
pub stairs: (i32, i32),
pub units: Vec<Unit>,
}Expand description
Each level has a Floor with a predefined width and height,
stairs positioned at the exit, and one or more units. There
is a player-controlled Warrior unit
for every level.
Fields
level: usizewhich level
width: usizethe east/west count of tiles
height: usizethe north/south count of tiles
stairs: (i32, i32)the position (x, y) of the exit
units: Vec<Unit>all of the units that the level contains
Implementations
Returns the predefined configuration for a given level number.
Returns true if a configuration exists for a given level number.
Returns a Tile representing the current state of a tile
of the floor at position.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Floor
impl UnwindSafe for Floor
Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any,
pub fn get_type_id(&self) -> TypeId
Mutably borrows from an owned value. Read more