* a ambas entidades que una colision a ocurrido.
*/
private void computeCollisions() {
for (int p = 0; p < entities.size(); p++) {
if (entities.get(p) instanceof MovingGameEntity) {
MovingGameEntity entity1 = (MovingGameEntity) entities.get(p);
for (int s = p + 1; s < entities.size(); s++) {
if (entities.get(s) instanceof MovingGameEntity) {
MovingGameEntity entity2 = (MovingGameEntity) entities.get(s);
if (entity1.isCollidingWith(entity2)) {
entity1.notifyCollisionWith(entity2);
entity2.notifyCollisionWith(entity1);
}
}
}
}
}