private void testForCollision(Ship ship, Shot shot)
    {
        if (!shot.isDying() && !ship.isExploding())
        {
            if (Calculator.getDistance(ship.getLocation(), shot.getLocation()) < 500)
            {
                if (ship.returnHitbox().collides(shot.returnHitbox()))
                { 
                    boolean[] removals;
                    if (ship.getShield().getEnergy() > 0)
                    {
                        EllipseHitbox hitbox = (EllipseHitbox)ship.returnHitbox();
                        removals = ship.CollisionEventWithShotWithShield(ship, shot, allShips,
                                hitbox.getAngleOnEllipse(shot.returnHitbox()), hitbox.getAngleToHitbox(shot.returnHitbox()));
                    }
                    else
                    {
                         removals = ship.CollisionEventWithShotWithHull(ship, shot, allShips);
                    }
                    if (removals[0]) // ship
                    {
                        ship.explode();
                    }
                    
                    if (removals[1]) // shot
                    {
                        shot.explode();
                    }
                }
            }
        }
    }