Skip to content

Instantly share code, notes, and snippets.

@sebastiandeutsch
Created July 15, 2013 18:44
Show Gist options
  • Save sebastiandeutsch/6002333 to your computer and use it in GitHub Desktop.
Save sebastiandeutsch/6002333 to your computer and use it in GitHub Desktop.
var roid, roid2, _i, _j, _len, _len2;
for (_i = 0, _len = asteroids.length; _i < _len; _i++) {
roid = asteroids[_i];
for (_j = 0, _len2 = asteroids.length; _j < _len2; _j++) {
roid2 = asteroids[_j];
if (roid !== roid2) {
if (roid.overlaps(roid2)) {
roid.explode();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment