pub(super) struct MansionGrid {
pub(super) base_grid: SimpleGrid,
pub(super) third_floor_grid: SimpleGrid,
pub(super) floor_rooms: [SimpleGrid; 3],
pub(super) entrance_x: i32,
pub(super) entrance_y: i32,
}Fields§
§base_grid: SimpleGrid§third_floor_grid: SimpleGrid§floor_rooms: [SimpleGrid; 3]§entrance_x: i32§entrance_y: i32Implementations§
Source§impl MansionGrid
impl MansionGrid
pub(super) fn new(rng: &mut LegacyRandom) -> Self
pub(super) fn recursive_corridor( grid: &mut SimpleGrid, rng: &mut LegacyRandom, x: i32, y: i32, heading: Direction, depth: i32, )
pub(super) fn clean_edges(grid: &mut SimpleGrid) -> bool
pub(super) fn identify_rooms( from: &SimpleGrid, rooms: &mut SimpleGrid, rng: &mut LegacyRandom, )
pub(super) fn setup_third_floor( base: &SimpleGrid, third: &mut SimpleGrid, floor_rooms: &mut [SimpleGrid; 3], rng: &mut LegacyRandom, )
pub(super) fn is_room_id( &self, x: i32, y: i32, floor: usize, room_id: i32, ) -> bool
pub(super) fn get_1x2_room_direction( &self, x: i32, y: i32, floor: usize, room_id: i32, ) -> Option<Direction>
pub(super) fn get_1x2_room_direction_static( floor_rooms: &SimpleGrid, x: i32, y: i32, room_id: i32, ) -> Option<Direction>
Auto Trait Implementations§
impl Freeze for MansionGrid
impl RefUnwindSafe for MansionGrid
impl Send for MansionGrid
impl Sync for MansionGrid
impl Unpin for MansionGrid
impl UnsafeUnpin for MansionGrid
impl UnwindSafe for MansionGrid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>