#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum TileType {
#[default]
Empty,
Floor,
Wall,
}
impl TileType {
#[inline]
pub fn is_passable(self) -> bool {
matches!(self, TileType::Floor)
}
#[inline]
pub fn is_wall(self) -> bool {
matches!(self, TileType::Wall)
}
#[inline]
pub fn is_empty(self) -> bool {
matches!(self, TileType::Empty)
}
}