Skip to content

Commit c9050ea

Browse files
Updated the MDX for the last PR #158
# Removed `continue` to allow paddle movement, ball position, and other updates to occur every frame. In the original loop, there was a continue statement after checking for the start event. This statement was causing the loop to skip the remaining code every time it ran, which prevented necessary updates like paddle and ball movement, collision checks, and display refreshes. Removing this continue ensures the game loop runs each frame completely.
1 parent e677358 commit c9050ea

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

projects/build-pong-with-pygame/build-pong-with-pygame.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ if not started:
238238
if event.key == pygame.K_SPACE:
239239
started = True
240240

241-
continue
242241
```
243242

244243
**NOTE**: when looking at the next part of the code, please keep in mind that that PyGame coordinates place (0, 0) at the top-left corner of the screen, and that increasing x means going to the right, and increasing y means going down.

0 commit comments

Comments
 (0)