private static void tryChargeElectricVehicle(Garage i_Garage, string i_LicensePlate) { if (i_Garage.IsElectricVehicle(i_LicensePlate)) { float chargingTime = getEnergyAmountToAdd(i_Garage.VehiclesInTheGarage[i_LicensePlate].OwnersVehicle); i_Garage.FillEnergy(i_LicensePlate, chargingTime); } else { Console.WriteLine("Can't Charge Non-Electric Vehicle"); } }
private static void tryFuelTank(Garage i_Garage, string i_LicensePlate) { if (i_Garage.IsGasVehicle(i_LicensePlate)) { Engine.eFuelType fuelType = getFuelType(i_Garage.VehiclesInTheGarage[i_LicensePlate].OwnersVehicle); float fuelAmount = getEnergyAmountToAdd(i_Garage.VehiclesInTheGarage[i_LicensePlate].OwnersVehicle); i_Garage.FillEnergy(i_LicensePlate, fuelAmount, fuelType); } else { Console.WriteLine("Can't Fuel Non-Gas Vehicle"); } }