Exemplo n.º 1
0
        public static float GetTrainValue(List <Car> cars)
        {
            float totalValue = cars.Sum(c => ResourceTypes.GetFullDamagePriceForCar(c.carType));

            totalValue += cars.Count * ResourceTypes.GetFullDamagePriceForCargo(CargoType.Passengers);
            // totalValue += cars.Count * ResourceTypes.GetFullEnvironmentDamagePriceForCargo(CargoType.Passengers);
            return(totalValue);
        }