Navigable trait

This commit is contained in:
jazzpi
2022-12-22 15:00:15 +01:00
parent 5e6870d092
commit ae143d4c57
2 changed files with 150 additions and 95 deletions

View File

@ -1,4 +1,7 @@
use aoc22::{day22, util};
use aoc22::{
day22::{self, Navigable},
util,
};
pub fn main() {
let (grid, instructions) = day22::parse_map_and_path(&util::parse_input());
@ -9,7 +12,7 @@ pub fn main() {
let mut pose = day22::Pose::new(&grid);
// dbg!(&pose);
for inst in &instructions {
pose = day22::exec_instruction(&grid, &pose, inst);
pose = grid.exec_instruction(&pose, inst).0;
// dbg!(&pose);
}