pub struct Location {
pub i: i32,
pub j: i32,
}
Fields§
§i: i32
§j: i32
Implementations§
Source§impl Location
impl Location
pub fn new(i: i32, j: i32) -> Self
pub fn valid_range() -> Range<i32>
pub fn nearby_locations(&self) -> Vec<Location>
pub fn reachable_by_bomb(&self) -> Vec<Location>
pub fn reachable_by_mystic_action(&self) -> Vec<Location>
pub fn reachable_by_demon_action(&self) -> Vec<Location>
pub fn reachable_by_spirit_action(&self) -> Vec<Location>
pub fn location_between(&self, another: &Location) -> Location
pub fn distance(&self, to: &Location) -> i32
Trait Implementations§
impl Copy for Location
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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