Skip to content

Commit

Permalink
Switched orders in Fruit Ninja
Browse files Browse the repository at this point in the history
  • Loading branch information
yus3 committed Jul 23, 2019
1 parent 2f4133f commit 79ac8cb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Solutions/02.5-FruitNinja/FruitNinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def main():
circle_colors = [(154, 58, 212), (135, 206, 235), (0, 255, 0)]
radius_list = [50, 60, 40]
center_points = [(25, 400), (-20, 300), (0, 100)]
velocity_list = [(10, -15), (8, -15), (10, -10)]
velocity_list = [(10, -15), (8, -15), (7, -10)]
gravity = -1
dead_velocity = (0, 40)

Expand All @@ -38,11 +38,6 @@ def main():
clock.tick(60)
screen.fill(pygame.Color("Black"))

# go through the list to draw all circles
for i in range(number_of_circles):
# draw the new circle
pygame.draw.circle(screen, circle_colors[i], center_points[i], radius_list[i])

# detect clicks in any circle
for event in pygame.event.get():
if event.type == pygame.QUIT:
Expand Down Expand Up @@ -79,7 +74,12 @@ def main():
new_velocity = (x_velocity, y_velocity - gravity)
velocity_list[i] = new_velocity


# go through the list to draw all circles
for i in range(number_of_circles):
center_x = center_points[i][0]
center_y = center_points[i][1]
int_center_point = (int(center_x), int(center_y))
pygame.draw.circle(screen, circle_colors[i], int_center_point, radius_list[i])

# blit the instruction font onto the screen
screen.blit(instructions_image, (10, 10))
Expand Down

0 comments on commit 79ac8cb

Please sign in to comment.