From 361de986ee0a775ce8ef918112bf3916f2c7b091 Mon Sep 17 00:00:00 2001 From: endernon Date: Wed, 4 Dec 2024 22:37:43 +0000 Subject: [PATCH] help --- 2024/day4/part1/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2024/day4/part1/src/main.rs b/2024/day4/part1/src/main.rs index 39224a3..732becc 100644 --- a/2024/day4/part1/src/main.rs +++ b/2024/day4/part1/src/main.rs @@ -33,7 +33,7 @@ fn main() { let leny = frfrvec.clone().len() - 1; for y in 1..leny + 1 { - let widthup = y - 1 > 4; + let widthup = (y) >= 4; let widthdown = (leny - y) > 4; for x in 1..lenx + 1 { @@ -42,7 +42,7 @@ fn main() { println!("y is {y}"); println!("width up: {}", widthup); println!("width down: {}", widthdown); - let widthleft = x - 1 > 4; + let widthleft = x >= 4; println!("width left: {}", widthleft); let widthright = (lenx - x) > 4; println!("width right: {}", widthright);