codedex-io / projects

Codédex Projects 📝
https://www.codedex.io/projects
MIT License
69 stars 45 forks source link

projects/build-pong-with-pygame /main.py #150

Closed copycode69 closed 1 month ago

copycode69 commented 1 month ago

bug1: Ball Position Reset: The ball did not reset correctly after going out of bounds. The ball_rect position is now set to the center of the screen when it goes out of bounds.

bug2:Collision Handling: The code had issues with the ball not bouncing off the paddles correctly due to the ball's position not being adjusted after a collision. Adjustments were made to ensure the ball is moved outside the paddle after a collision.

bug3:Boundary Checks: The original code had incorrect boundary checks for the ball. The code now checks for the top and bottom boundaries properly.