Transaction[] t = settings.transactionsGenerator.createTransactions(); for (int i = 0; i < t.length; i++) cost += t[i].getValue() / 100;
cost += settings.transactionsGenerator.getTotalCost() / 100;
    public int getCost() {	if (cost != Integer.MIN_VALUE) {	    return cost;	}	cost = 0;	boolean nodebug = ! logger.isLoggable(Level.FINEST);	if (parent != null) 	    cost = parent.getIncrementalCost(initialDirection);	logger.log (Level.FINEST, nodebug ? "" : "Incremental cost:" + cost);	// calculate the cost of purchasing the tile, if required.	FreerailsTile ft = world.getTile(x, y);	if (! settings.owner.equals(ft.getOwner())) {	    settings.terrainTileViewer.setFreerailsTile(x, y);	    cost += settings.terrainTileViewer.getTerrainValue() / 100;	}	logger.log (Level.FINEST, nodebug ? "" : "After tile purchase cost:" + cost);	/* These calculations should produce 0 cost if we already have	 * existing track */	byte config1 = 0;        if (ft.getTrackTile() != null)	    config1 = ft.getTrackTile().getTrackConfiguration();	byte config2 = (byte) (config1 | direction);	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();	for (int i = 0; i < t.length; i++)	    cost += t[i].getValue() / 100;	logger.log (Level.FINEST, nodebug ? "" : "After track laying cost:" + cost);	// calculate penalties / bonus due to terrain	if (parent != null) 	    settings.terrainTileViewer.setFreerailsTile(parent.x, parent.y);	int effectiveIncline = settings.terrainTileViewer	    .getEffectiveIncline(x, y);	cost += settings.getTerrainBonus(effectiveIncline);	logger.log (Level.FINER, nodebug ? "" : "Total track laying cost:" + cost);	return cost;    }