Skip to content

Commit e879c77

Browse files
Merge pull request #2723 from avinashkranjan/deepsource-transform-3e21694a
format code with autopep8
2 parents 0cc9191 + 08b8835 commit e879c77

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Physics Puzzle Game/physics_puzzle_game.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# Main game loop
2222
clock = pygame.time.Clock()
2323

24+
2425
def create_physics_object(x, y, vertices):
2526
body = pymunk.Body(1, 100)
2627
body.position = x, y
@@ -29,6 +30,7 @@ def create_physics_object(x, y, vertices):
2930
space.add(body, shape)
3031
return body
3132

33+
3234
# Create interactive objects
3335
object_vertices = [(-30, -30), (30, -30), (30, 30), (-30, 30)]
3436
interactive_object = create_physics_object(200, 500, object_vertices)
@@ -64,7 +66,8 @@ def create_physics_object(x, y, vertices):
6466
for body in space.bodies:
6567
for shape in body.shapes:
6668
# Convert physics coordinates to screen coordinates
67-
vertices = [(body.position + v.rotated(body.angle)) for v in shape.get_vertices()]
69+
vertices = [(body.position + v.rotated(body.angle))
70+
for v in shape.get_vertices()]
6871
vertices = [(v.x, SCREEN_HEIGHT - v.y) for v in vertices]
6972
pygame.draw.polygon(screen, BLACK, vertices)
7073

0 commit comments

Comments
 (0)