smv.getImprovementCost(improvementKey.index));
- smv.getImprovementCost(improvementKey.index));
	generateAddImprovementMove(ReadOnlyWorld w, ObjectKey stationKey,		ObjectKey improvementKey)	{	    StationModel before = (StationModel) w.get(KEY.STATIONS,		    stationKey.index, stationKey.principal);	    // determine whether we can build this improvement	    StationModelViewer smv = new StationModelViewer(w);	    smv.setStationModel(before);	    if (!smv.canBuildImprovement(improvementKey.index))		return null;	    int[] improvements = before.getImprovements();	    ArrayList tmp = new ArrayList();	    StationImprovement si = (StationImprovement)		w.get(KEY.STATION_IMPROVEMENTS, improvementKey.index,			Player.AUTHORITATIVE);	    int[] replaced = si.getReplacedImprovements();	    for (int i = 0; i < improvements.length; i++)		tmp.add(new Integer(improvements[i]));	    tmp.add(new Integer(improvementKey.index));	    for (int i = 0; i < replaced.length; i++) {		if (tmp.contains(new Integer(replaced[i]))) {			tmp.remove(new Integer(replaced[i]));		}	    }	    int[] newImprovements = new int[tmp.size()];	    for (int i = 0; i < newImprovements.length; i++)		newImprovements[i] = ((Integer) tmp.get(i)).intValue();	    StationModel after = (StationModel)		before.setImprovements(newImprovements);	    Move changeStationMove = new ChangeStationMove(stationKey.index,		    before, after, stationKey.principal);	    // generate transaction	    GameTime now = (GameTime) w.get(ITEM.TIME, Player.AUTHORITATIVE);	    Transaction t = new AddItemTransaction(now,		    AddItemTransaction.BUILDING, 0, 1,		    smv.getImprovementCost(improvementKey.index));	    Move transactionMove = new AddTransactionMove(0, t,		    stationKey.principal);	    return new AddRemoveStationImprovementMove		(new Move[] {changeStationMove, transactionMove});	}