/// <summary> /// That is possible margin in that case. Includes tax. New value /// </summary> public Procent GetPossibleMargin(Province province) { var profit = getPossibleProfit(province); var taxes = profit.Copy().multiply(province.GetCountry().taxationForRich.getTypedValue().tax); profit.subtract(taxes); return(new Procent(profit, GetBuildCost())); }
//internal Army getVirtualArmy(Procent howMuchShouldBeInSecondArmy) //{ // if (howMuchShouldBeInSecondArmy.get() == 1f) // { // return this; // //this.personal.Clear(); // } // else // { // Army secondArmy = new Army(this.getOwner()); // //Army sumArmy = new Army(); // //sumArmy.add(this); // //this.joinin(secondArmy); // int secondArmyExpectedSize = howMuchShouldBeInSecondArmy.getProcent(this.getSize()); // //secondArmy.clear(); // int needToFullFill = secondArmyExpectedSize; // while (needToFullFill > 0) // { // var corpsToBalance = this.getBiggestCorpsSmallerThan(needToFullFill); // if (corpsToBalance == null) // break; // else // //this.move(corpsToBalance, secondArmy); // secondArmy.add(new Corps(corpsToBalance)); // needToFullFill = secondArmyExpectedSize - secondArmy.getSize(); // } // return secondArmy; // } //} internal BattleResult attack(Province prov) { var enemy = prov.GetCountry(); if (enemy == Country.NullCountry) { prov.mobilize(); } else { enemy.mobilize(enemy.ownedProvinces); } enemy.consolidateArmies(); return(attack(enemy.getDefenceForces())); }
virtual public Country GetCountry() { return(province.GetCountry()); }
protected Producer(Province province) : base(province.GetCountry().getBank(), province) { }
public Country GetCountry() { return(Province.GetCountry()); }