struct Maze {
hedges: HashSet<(u8, u8)>,
start: (u8, u8),
end: (u8, u8),
bounds: (u8, u8),
}
Fields§
§hedges: HashSet<(u8, u8)>
§start: (u8, u8)
§end: (u8, u8)
§bounds: (u8, u8)
Implementations§
source§impl Maze
impl Maze
sourcefn lowest_scoring_route(&self) -> u32
fn lowest_scoring_route(&self) -> u32
Solves part 1 using A* graph search
sourcefn count_visited_by_best_routes(&self) -> u32
fn count_visited_by_best_routes(&self) -> u32
Solves part 2 using A* graph search that continues until all best routes are found
sourcefn starting_position(&self) -> Position
fn starting_position(&self) -> Position
Turn the coordinates for the start point of the maze into the seed Position for searching the maze
Trait Implementations§
impl Eq for Maze
impl StructuralPartialEq for Maze
Auto Trait Implementations§
impl Freeze for Maze
impl RefUnwindSafe for Maze
impl Send for Maze
impl Sync for Maze
impl Unpin for Maze
impl UnwindSafe for Maze
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<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.