Пример #1
0
 private static void placeNewLandUnits(Nation player)
 {
     foreach (MyEnum.ArmyUnits unitType in Enum.GetValues(typeof(MyEnum.ArmyUnits)))
     {
         string capitalString            = player.capital;
         assemblyCsharp.Province capital = State.GetProvinceByName(capitalString);
         for (int i = 0; i < player.getArmyProducing(unitType); i++)
         {
             Army newArmy = new Army(player.getIndex());
             newArmy.addUnit(unitType);
             newArmy.setLocation(capital.getIndex());
             capital.addFriendlyArmy(newArmy.GetIndex());
             player.addArmy(newArmy);
             armyPlacer.placeArmyOnMap(capital.getIndex(), player, newArmy.GetIndex());
         }
     }
 }