Skip to content

Commit

Permalink
Merge pull request #22 from jknockel/fix-particle-drawing
Browse files Browse the repository at this point in the history
Fix particle drawing in tree mode
  • Loading branch information
sontek authored Dec 20, 2023
2 parents e647816 + 1d08240 commit fbfff9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions snowmachine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def tree(light_delay, color, lights_color, snow_color, particle, snow, snow_part
treeparts = []
trunkparts = []

particle = particle or get_random_flake()
particle = particle or '*'

trunk_size = 3
tree_rows = rows - trunk_size
Expand Down Expand Up @@ -178,7 +178,7 @@ def tree(light_delay, color, lights_color, snow_color, particle, snow, snow_part

# its already on the screen, move it
if col in snowflakes.keys():
move_flake(snowflakes, current_rows, col, None, particle, snow_color)
move_flake(snowflakes, current_rows, col, None, snow_particle, snow_color)
else:
# otherwise put it on the screen
flake = snow_particle if snow_particle else get_random_flake()
Expand All @@ -187,7 +187,7 @@ def tree(light_delay, color, lights_color, snow_color, particle, snow, snow_part

# key any flakes on the screen moving
for flake in snowflakes.keys():
move_flake(snowflakes, current_rows, flake, None, particle, snow_color)
move_flake(snowflakes, current_rows, flake, None, snow_particle, snow_color)
##### SNOW ######

end = time.time()
Expand Down

0 comments on commit fbfff9f

Please sign in to comment.