Beispiel #1
0
        //member methods
        public int GetNumberOfLemonsUsedInRecipe(Inventory inventory)
        {
            UserInterface.LemonRecipePrompt();
            int lemonsPerPitcher;

            while (!int.TryParse(Console.ReadLine(), out lemonsPerPitcher) || lemonsPerPitcher > inventory.LemonCount || lemonsPerPitcher <= 0)
            {
                UserInterface.InvalidLemonRecipeEntry();
            }
            return(lemonsPerPitcher);
        }