Skip to content

Commit

Permalink
improve color changing algrithm
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheukting committed Jun 4, 2024
1 parent 0937c49 commit 847bb4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 847bb4f

Please sign in to comment.