You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was going through your code and realized a small formatting error. I don't know if you still keep up with this repo but I though I'd point it out.
In your file "Flappy_bird.py", you wrote this starting on line 368
for pipe in pipes:
...
for bird in birds:
...
if not pipe.passed and pipe.x < bird.x:
pipe.passed = True
add_pipe = True
The problem on line 381 is that bird.x cannot be referenced because it is not inside the birds for loop. I do not know if this was meant on purpose or if this error even occurs. I would suggest changing it to
if not pipe.passed and pipe.x < birds[0].x:
Thank you for your time and thanks for the videos!
The text was updated successfully, but these errors were encountered:
Hi Tim,
I was going through your code and realized a small formatting error. I don't know if you still keep up with this repo but I though I'd point it out.
In your file "Flappy_bird.py", you wrote this starting on line 368
The problem on line 381 is that bird.x cannot be referenced because it is not inside the birds for loop. I do not know if this was meant on purpose or if this error even occurs. I would suggest changing it to
Thank you for your time and thanks for the videos!
The text was updated successfully, but these errors were encountered: