From eb0f2ab870c41a5484426717d971e177f25fdb0a Mon Sep 17 00:00:00 2001 From: mehbark <terezi@pyrope.net> Date: Tue, 11 Mar 2025 23:35:47 -0400 Subject: [PATCH] fix: ACTUALLY GOOD AGAIN --- src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index b5290c8..5d61c2c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -116,6 +116,10 @@ impl Game { let (ox, oy) = (x + dx, y + dy); if (x, y) == (ox, oy) { + // small, small comeback chance for da diversity (this is 1 in 9 to even be checked) + if rng.random::<f32>() < 0.01 { + next.set(x, y, rng.random()); + } continue; } @@ -125,11 +129,8 @@ impl Game { let here = self.at(x, y).unwrap(); - if other == here { - continue; - } - let won = rng.random::<f32>() <= here.win_chance(other); + // setting both pixels reduces noise a lot if won { next.set(x, y, here); next.set(ox, oy, here);