Compare commits
2 Commits
a1dceb6ff1
...
9f602bb947
Author | SHA1 | Date | |
---|---|---|---|
9f602bb947 | |||
df01a1fcd0 |
@ -99,7 +99,8 @@ pub struct Map {
|
||||
impl<T: BufRead> From<T> for Map {
|
||||
fn from(input: T) -> Self {
|
||||
let grid = Grid::from(input);
|
||||
let visited_from = grid.same_shape(DirectionSet::empty());
|
||||
let mut visited_from: Grid<DirectionSet> = Grid::new(grid.width() as i64);
|
||||
visited_from.data.resize(grid.data.len(), 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