Creating a classic Pong game using Python. From setting up the game environment to coding the paddle and ball movements, I cover each step by adding comment by every line explaining what it does .
At 6:17 what is the if statement doing? I'm so confused ! what are you trying to do with the statement ``` if left_paddle.y < ball.y < left_paddle.y + left_paddle.height:```
lets say the ball is zipping across the screen, heading left. We need to figure out if it's going to smack into that left paddle. (ball.x_vel < 0) checks if its moving left. (left_paddle.y < ball.y < left_paddle.y + left_paddle.height) checks if its moving verticaly and (ball.x - ball.radius
At 6:17 what is the if statement doing? I'm so confused ! what are you trying to do with the statement
``` if left_paddle.y < ball.y < left_paddle.y + left_paddle.height:```
lets say the ball is zipping across the screen, heading left. We need to figure out if it's going to smack into that left paddle. (ball.x_vel < 0) checks if its moving left. (left_paddle.y < ball.y < left_paddle.y + left_paddle.height) checks if its moving verticaly and (ball.x - ball.radius
hi