From 847bb4fa455efe06e12ba8abca8022e6826435fa Mon Sep 17 00:00:00 2001 From: Cheukting Date: Tue, 4 Jun 2024 19:03:33 +0200 Subject: [PATCH] improve color changing algrithm --- app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 1312fb0..a39b866 100644 --- a/app.py +++ b/app.py @@ -16,7 +16,9 @@ def __init__(self, self.color = [random.random(), random.random(), random.random()] else: self.color = color - self.color_change = [1, 1, 1] + self.color_change = [random.choice([1, -1]), + random.choice([1, -1]), + random.choice([1, -1])] # init points if points is None: