@Override
    protected int calculateQualityDifference() {
        int d = super.calculateQualityDifference();
        if (sellIn <= 10)
            d++;
        if (sellIn <= 5)
            d++;
        if (sellIn <= 0)
            d = -quality;
        if (quality >= 50)
            d = 0;

        return d;
    }