Skip to content

Instantly share code, notes, and snippets.

@boyanov83
Created September 17, 2014 18:00
Show Gist options
  • Save boyanov83/097de94bab1aa9d55e5c to your computer and use it in GitHub Desktop.
Save boyanov83/097de94bab1aa9d55e5c to your computer and use it in GitHub Desktop.
private static boolean collisionCheck(Object rockX, Object rockY, int spaceshipx,
int spaceshipy) {
if ((spaceshipx >= (int)rockX && spaceshipx <= (int)rockX + 16)
&& (spaceshipy >= (int)rockY && spaceshipy <= (int)rockY + 16)) {
return true;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment