Пример #1
0
        public static void SetupTank(ref Tank setupTank, int soldierAmount, int tankDistance)
        {
            var totalDistance = 0.0;

            for (var i = 0; i < setupTank.AmountOfTrips(soldierAmount); i++)
            {
                totalDistance += setupTank.Move(tankDistance);
            }

            setupTank.TotalFuelConsumption = totalDistance * setupTank.FuelConsumption / 100;
        }