Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
breakout clone pygame
#2
Please post code in code tags instead of uploading an attachment. It makes it a pain to view in a phone

Your traceback shows that lives is not an int as expected.Your move method returns an int only if thr if condition is met, so I suspect one time it is not met, and returning None. Functions return None if nothing else is returned.

Also in pygame you can clamp a rect to the screen
rect nullifying any code to restrict thr object from going out of screen with a one liner.
Recommended Tutorials:
Reply


Messages In This Thread
breakout clone pygame - by flash77 - Feb-06-2022, 06:46 AM
RE: breakout clone pygame - by metulburr - Feb-06-2022, 10:22 AM
RE: breakout clone pygame - by flash77 - Feb-06-2022, 06:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  breakout clone flash77 32 8,577 Mar-07-2022, 08:12 PM
Last Post: deanhystad
  [PyGame] arkanoid / breakout clone flash77 2 4,094 Feb-04-2022, 05:42 PM
Last Post: flash77

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020