struct DoubleWarehouse {
walls: HashSet<(usize, usize)>,
boxes: HashSet<(usize, usize)>,
robot: (usize, usize),
bounds: (usize, usize),
}
Fields§
§walls: HashSet<(usize, usize)>
§boxes: HashSet<(usize, usize)>
§robot: (usize, usize)
§bounds: (usize, usize)
Trait Implementations§
source§impl Clone for DoubleWarehouse
impl Clone for DoubleWarehouse
source§fn clone(&self) -> DoubleWarehouse
fn clone(&self) -> DoubleWarehouse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DoubleWarehouse
impl Debug for DoubleWarehouse
source§impl FromStr for DoubleWarehouse
impl FromStr for DoubleWarehouse
source§impl PartialEq for DoubleWarehouse
impl PartialEq for DoubleWarehouse
source§impl Warehouse for DoubleWarehouse
impl Warehouse for DoubleWarehouse
source§fn move_box(&mut self, pos: &(usize, usize), mv: &Move) -> bool
fn move_box(&mut self, pos: &(usize, usize), mv: &Move) -> bool
Move this box, and push any box that is part in either of the two destination squares. If this fails, some boxes may have been moved and the current warehouse should be considered invalid.
source§fn move_robot(&self, mv: &Move) -> Self
fn move_robot(&self, mv: &Move) -> Self
Move the robot pushing any boxes in the way. If the box move fails the partially updated grid is discarded and an unmodified clone returned instead.
impl Eq for DoubleWarehouse
impl StructuralPartialEq for DoubleWarehouse
Auto Trait Implementations§
impl Freeze for DoubleWarehouse
impl RefUnwindSafe for DoubleWarehouse
impl Send for DoubleWarehouse
impl Sync for DoubleWarehouse
impl Unpin for DoubleWarehouse
impl UnwindSafe for DoubleWarehouse
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.