Posts by vaicartana

    I'm not sure I chose the right forum, but here are the author modification "industrial" ...
    I found a wasteful method of obtaining the difference tier in the "calculateRatioFor"


    Code
    if (b.tier() < a.tier() - 1) {
       	value -= 2 * (a.tier() - b.tier());
     	}
     	if (b.tier() - 3 > a.tier()) {
       	value -= b.tier() - a.tier();
     	}


    it can be rewritten as follows:

    Code
    int tier = a.tier() - b.tier();
    if (tier > 1) {
       	value -= 2 * tier;
     	}
     	if ( tier < -3) {
       	value += tier;
     	}


    This is small change and the load too small, but I hope the mod will be a little better...