public int calculateStepPrice(XY xy0, XY xy1) {
        int step = XY.distance(xy1, xy0);
        if (step > XY.DiagonalLong) {
            return -1;
        }
        if (step == XY.DiagonalLong) {
            Set<MyObject> objects = new HashSet<MyObject>();
            objects.add(model.getBoard().get(new XY(xy0.getX(), xy1.getY())));
            objects.add(model.getBoard().get(new XY(xy1.getX(), xy0.getY())));
            for (MyObject object : objects) {
                if (object != null) {
                    if (object.blockMovement(this)) {
                        return -1;
                    }
                }
            }
        }
        return step;
    }