public void WhenIProduce(int numberOfUnits, Unit unit) { if (this.productionRun == null) { this.productionRun = new ProductionRun(this.technology, this.race); } this.productionRun.Produce(numberOfUnits, unit); }
public void Produce(int numberOfUnits, Unit unit) { var cost = (unit.Cost * numberOfUnits); if (unit.NumberOfUnitsForCost != 1) { cost = (cost / unit.NumberOfUnitsForCost) + (cost % unit.NumberOfUnitsForCost); } if (unit == Units.Dreadnought && this.race == Races.L1z1xMindnet) { cost = 4 * numberOfUnits; } this.Cost += cost; }