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"); } }