Advertisement
Guest User

Space invaders

a guest
Mar 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. def isCollision(t1, t2):
  2.     distance = math.sqrt(math.pow(t1.xcor()-t2.xcor(),2)+math.pow(t1.ycor()-t2.ycor(),2))
  3.     if distance < 15:
  4.         return True
  5.     else:
  6.         return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement