From f0d41f15ee5424c76db0f2e2efbefba6c37fc140 Mon Sep 17 00:00:00 2001 From: Elijah Voigt Date: Sat, 11 Oct 2025 22:03:17 -0700 Subject: [PATCH] Potential logic fix --- src/bin/tetris/main.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/bin/tetris/main.rs b/src/bin/tetris/main.rs index 25aa4b7..724be0a 100644 --- a/src/bin/tetris/main.rs +++ b/src/bin/tetris/main.rs @@ -154,7 +154,7 @@ impl GridPosition { } fn is_colliding_with(&self, other: &Self) -> bool { - self.x == other.x && self.y + 1 == other.y + self.x == other.x && self.y - 1 == other.y } fn add_offset(&self, RelativePosition { x: x1, y: y1 }: &RelativePosition) -> Self { @@ -586,11 +586,7 @@ fn check_collision( // Check if active peice is near other blocks let hit_block = inactive.iter().any(|b| { debug!("Checking against: {:?}", b); - if a.is_colliding_with(b) { - info!("{:?} is colliding with {:?}", a, b); - true - } else { false } - + a.is_colliding_with(b) }); hit_floor || hit_block