public void seek(int i){
        double a2=0;
        if(!directed) {
            a2 = Math.atan2((double) -(objects.get(i).y - y), (double) (objects.get(i).x - x));
        } else {
            a2 = Math.atan2((double) -(User.userY - y), (double) (User.userx - x));
        }
        a2=(a2 %= Math.toRadians(360)) >= 0 ? a2 : (a2 + Math.toRadians(360));

        double dif = a2-angle;
        if(dif>Math.toRadians(180))
            dif-=Math.toRadians(360);
        else if(dif<Math.toRadians(-180))
            dif+=Math.toRadians(360);

        if((compareAngle(angle,a2))) {
            if(compareAngle(angle+ Math.toRadians(2) * power,a2)==compareAngle(angle,a2))
            setAngle(angle + Math.toRadians(2) * power);
            else
                setAngle(a2);
        }else {
            if(compareAngle(angle- Math.toRadians(2) * power,a2)==compareAngle(angle,a2))
            setAngle(angle - Math.toRadians(2) * power);
            else
            setAngle(a2);
        }

    }