Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. def isHeadCollision(other: Snake): Boolean = initPos.x + initPos.dim.x == other.initPos.x && initPos.y == other.initPos.y
  2.  
  3. def isTailCollision(other: Snake): Boolean = isOccupyingBlockAt(other.initPos)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement