Added boundary check , pseudocode for headon and underneath collisions