Compare commits
2 Commits
9f602bb947
...
a1dceb6ff1
Author | SHA1 | Date | |
---|---|---|---|
a1dceb6ff1 | |||
3712b32634 |
@ -99,8 +99,7 @@ pub struct Map {
|
||||
impl<T: BufRead> From<T> for Map {
|
||||
fn from(input: T) -> Self {
|
||||
let grid = Grid::from(input);
|
||||
let mut visited_from: Grid<DirectionSet> = Grid::new(grid.width() as i64);
|
||||
visited_from.data.resize(grid.data.len(), DirectionSet::empty());
|
||||
let visited_from = grid.same_shape(DirectionSet::empty());
|
||||
let guard_pos = grid.find(&b'^').expect("Guard not found");
|
||||
let guard_facing = FacingDirection::Up;
|
||||
Self {
|
||||
|
Loading…
x
Reference in New Issue
Block a user