Skip to content

Fix pygame examples for Python 3 compatibility#6

Open
ran4om wants to merge 1 commit intoternus:masterfrom
ran4om:fix/pygame-examples-runnable
Open

Fix pygame examples for Python 3 compatibility#6
ran4om wants to merge 1 commit intoternus:masterfrom
ran4om:fix/pygame-examples-runnable

Conversation

@ran4om
Copy link
Copy Markdown

@ran4om ran4om commented Mar 15, 2026

Summary

  • Fix integer division in snake.py and snake2.py (Python 3 compatibility)
  • Fix variable naming bug in snake2.py's check_eat_blueberry function
  • Fix Python 2 syntax in lunarlander.py (print statements, exception handling)
  • Add fallback graphics for lunarlander when images can't be loaded

- snake.py: Fix integer division (//)
- snake2.py: Fix integer division and variable naming bug in check_eat_blueberry
- lunarlander.py: Fix Python 2 syntax, add fallback graphics for missing images
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

Successfully merging this pull request may close these issues.

1 participant