pub struct Orthogonal { /* private fields */ }Expand description
Cell:
| flag | description |
|---|---|
| 0-5 | Algorithm customization |
| 6 | Left wall |
| 7 | Up wall |
Implementations§
Source§impl Orthogonal
impl Orthogonal
pub fn new(width: usize, height: usize) -> Self
pub fn center_point(&self) -> (usize, usize)
pub fn get(&self, x: usize, y: usize) -> &u8
pub fn get_mut(&mut self, x: usize, y: usize) -> &mut u8
pub fn set(&mut self, x: usize, y: usize, value: u8)
Sourcepub fn break_wall(&mut self, x: usize, y: usize, wall: &Direction2D)
pub fn break_wall(&mut self, x: usize, y: usize, wall: &Direction2D)
应判断是否越界,但从性能角度考虑,交给生成算法判断
Trait Implementations§
Source§impl Default for Orthogonal
impl Default for Orthogonal
Source§impl DepthFirst for Orthogonal
impl DepthFirst for Orthogonal
fn depth_first_with_rng<R: Rng + ?Sized>(&mut self, rng: &mut R)
fn depth_first_with_seed(&mut self, seed: [u8; 16])
fn depth_first_with_str_seed(&mut self, seed: &str)
fn depth_first(&mut self)
Source§impl Draw for Orthogonal
impl Draw for Orthogonal
Auto Trait Implementations§
impl Freeze for Orthogonal
impl RefUnwindSafe for Orthogonal
impl Send for Orthogonal
impl Sync for Orthogonal
impl Unpin for Orthogonal
impl UnwindSafe for Orthogonal
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