@@ -101,8 +101,10 @@ def create_explosion(center_x, center_y, num_balls):
101
101
102
102
103
103
# 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 )
106
108
107
109
surface = pygame .Surface ((display .get_width (), display .get_height ()))
108
110
# Main loop
@@ -127,8 +129,10 @@ def create_explosion(center_x, center_y, num_balls):
127
129
index += 1
128
130
129
131
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 )
132
136
133
137
pygame .display .flip ()
134
138
clock .tick (60 )
0 commit comments