grid: use coord2d more consistently

This commit is contained in:
2024-12-21 21:01:06 -08:00
parent 13f61e3a2b
commit 02fc154547
6 changed files with 37 additions and 15 deletions

View File

@ -118,7 +118,7 @@ fn part1_impl(input: &str, cheat_min: usize) -> i64 {
let track = parse(input);
let start = track.map.find(&b'S').unwrap();
let goal = track.map.find(&b'E').unwrap();
let (best_path, costs) = track.path_costs(start, goal);
let (best_path, costs) = track.path_costs(start.into(), goal.into());
let cheats = track.find_cheats(&best_path, &costs, cheat_min);
cheats.len() as i64