byte config1 = CompassPoints.invert(initialDirection); if (ft.getTrackTile() != null)
byte config1 = initialDirection; if (ft.getTrackTile() != null)
    private int getIncrementalCost(byte d) {	if (d == 0)	    return 0;	FreerailsTile ft = world.getTile(x, y);	byte config1 = CompassPoints.invert(initialDirection);	if (ft.getTrackTile() != null) 	    config1 |= ft.getTrackTile().getTrackConfiguration();	byte config2 = (byte) (config1 | d);	TrackTile tt1 = TrackTile.createTrackTile(world, config1,		settings.trackRuleIndex);	TrackTile tt2 = TrackTile.createTrackTile(world, config2,		settings.trackRuleIndex);	settings.transactionsGenerator.resetTransactions();	settings.transactionsGenerator.addTrackChange(ft, tt1, tt2);	Transaction[] t = settings.transactionsGenerator.createTransactions();	long cost = 0L;	for (int i = 0; i < t.length; i++) {	    cost += t[i].getValue();	}	return (int) (cost / 100);    }