15 lines
352 B
Rust
15 lines
352 B
Rust
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());
|
|
}
|