Skip to content

Instantly share code, notes, and snippets.

@cflewis
Created February 13, 2010 10:00
Show Gist options
  • Save cflewis/303366 to your computer and use it in GitHub Desktop.
Save cflewis/303366 to your computer and use it in GitHub Desktop.
for (int p=0;p<entities.size();p++) {
for (int s=p+1;s<entities.size();s++) {
Entity me = (Entity) entities.get(p);
Entity him = (Entity) entities.get(s);
if (me.collidesWith(him)) {
me.collidedWith(him);
him.collidedWith(me);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment