Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pong_Game.py #332

Open
Jnmarti88 opened this issue Jan 11, 2023 · 3 comments
Open

Pong_Game.py #332

Jnmarti88 opened this issue Jan 11, 2023 · 3 comments

Comments

@Jnmarti88
Copy link

Issue:
line 95, in
ball_dx = ball_dx * -1
NameError: name 'ball_dx' is not defined

game crashes moments after starting. Paddle appears on left hand side but there is no paddle on the right hand side of the game

@loki4514
Copy link

loki4514 commented Mar 7, 2023

hi,
can i work on this issue

@Al3x1sCS
Copy link

The error you are facing in the Pong game is because the ball_dx variable is not being found. Instead, there is a variable called ballxdirection. To fix the error you will need to replace all instances of ball_dx with ballxdirection.

the peddle appears on the opposite side because the number has to be negative to be on the right.

However, keep in mind that this correction may lead to another error in the score part. This is because the game still needs other fixes, like the logic of how the ball will hit the walls and also the logic to not let the paddles leave the screen.

You can make the changes yourself to fix it or if you want I can clone the project create a new branch and ask for a PR or I can make the corrections directly in the project, you know, I'm looking for my first issue on github.

@MercuryDemo
Copy link

hi, can i work on this issue?I'm looking for my first issue on github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants