Fix part2 not working on some inputs

This commit is contained in:
Adrian Groh 2024-12-14 12:33:37 +01:00
parent a68e7f0f03
commit 830c450973
Signed by: Gobidev
GPG Key ID: 3AA3153E98B0D771

View File

@ -72,7 +72,7 @@ fn print_map(robots: &[Robot], dimensions: &IVec2) -> String {
} }
fn has_tree(robots: &[Robot]) -> bool { fn has_tree(robots: &[Robot]) -> bool {
let check: Vec<_> = (0..8).map(|i| IVec2::new(i, 0)).collect(); let check: Vec<_> = (0..16).map(|i| IVec2::new(i, 0)).collect();
robots.iter().any(|p| { robots.iter().any(|p| {
check check
.iter() .iter()