Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #write temp vars then test wall
- #check for walls:
- if 0 > x or x > WIDTH:
- dx = dx * -1
- print 'x is out', x
- #if dx2 > 0:
- #dx2 += 1
- #elif 0 < dx2:
- #dx2 += -1
- #else:
- #print dx2, 'x probably equals 0'
- if 0 > y or y > HEIGHT:
- dy = dy * -1
- print 'y is out', y
- #if dx2 > 0:
- #dy2 += 1
- #elif 0 < dy2:
- #dy2 += -1
- #else:
- #print dy2, 'y probably equals 0'
Advertisement
Add Comment
Please, Sign In to add comment