Skip to content

Commit eb32c91

Browse files
new effect!
1 parent 465f6bd commit eb32c91

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ The following Python programs HAVE been turned into YouTube videos:
4545
* `line dance.py` in: [[1 hour version] 4K Dancing Lines](https://youtu.be/aLU456XVQWY)
4646
* `perlin spline.py` in: [[1 hour version] 4K Colored Perlin Lines](https://youtu.be/KD6DiJURHX8)
4747
* `ball creation.py` in: To be released!
48+
* `1000 bouncy balls.py` in: To be released!
4849

4950
The following Python programs WILL LIKELY be turned into YouTube videos soon:
5051
* `Colored Pixels.py`

Diff for: src/1000 bouncy balls.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ def create_explosion(center_x, center_y, num_balls):
101101

102102

103103
# Initialize explosion
104-
number_of_balls = random.randint(10, 120)
105-
balls = create_explosion(display.get_width() / 2, display.get_height() / 2, number_of_balls)
104+
#number_of_balls = random.randint(10, 120)
105+
#balls = create_explosion(display.get_width() / 2, display.get_height() / 2, number_of_balls)
106+
number_of_balls = random.randint(1, 120)
107+
balls = create_explosion(display.get_width() / 2, 10, number_of_balls)
106108

107109
surface = pygame.Surface((display.get_width(), display.get_height()))
108110
# Main loop
@@ -127,8 +129,10 @@ def create_explosion(center_x, center_y, num_balls):
127129
index += 1
128130

129131
if len(balls) == 0:
130-
number_of_balls = random.randint(10, 120)
131-
balls = create_explosion(display.get_width() / 2, display.get_height() / 2, number_of_balls)
132+
#number_of_balls = random.randint(10, 120)
133+
#balls = create_explosion(display.get_width() / 2, display.get_height() / 2, number_of_balls)
134+
number_of_balls = random.randint(1, 120)
135+
balls = create_explosion(display.get_width() / 2, 10, number_of_balls)
132136

133137
pygame.display.flip()
134138
clock.tick(60)

0 commit comments

Comments
 (0)