Day 9, both puzzles

This commit is contained in:
jazzpi
2022-12-15 11:35:33 +01:00
parent 9a64352fc3
commit 3f05695ea3
4 changed files with 164 additions and 0 deletions

14
src/bin/d9p1.rs Normal file
View File

@ -0,0 +1,14 @@
use aoc22::{day9, util};
pub fn main() {
let motions = day9::parse_motions(&util::parse_input());
let mut state = day9::State::new(1);
for motion in &motions {
day9::execute_motion(&mut state, &motion);
}
println!("State after all motions:");
state.print();
println!("Visited fields: {}", state.visited.len());
}