Skip to content

Commit b73042b

Browse files
Merge pull request #2722 from avinashkranjan/deepsource-transform-e1fbbba9
format code with autopep8
2 parents e879c77 + 1e47029 commit b73042b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Gravity Simulation Game/gravity_simulation_game.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
# Check for collisions with celestial bodies
9090
if distance < body["mass"] + spaceship_radius:
9191
collision_sound.play()
92-
pygame.draw.circle(screen, RED, body["pos"], int(body["mass"] / 10))
92+
pygame.draw.circle(
93+
screen, RED, body["pos"], int(body["mass"] / 10))
9394
pygame.draw.circle(screen, YELLOW, spaceship_pos, spaceship_radius)
9495
pygame.display.flip()
9596
pygame.time.delay(2000)
@@ -119,7 +120,8 @@
119120
# Check for level completion
120121
if spaceship_pos[0] > WIDTH or spaceship_pos[0] < 0 or \
121122
spaceship_pos[1] > HEIGHT or spaceship_pos[1] < 0:
122-
score += fuel + (level * 100) # Increase score based on remaining fuel and level
123+
# Increase score based on remaining fuel and level
124+
score += fuel + (level * 100)
123125
level += 1
124126
fuel = 100
125127
spaceship_pos = [WIDTH // 2, HEIGHT // 2]

0 commit comments

Comments
 (0)