Пример #1
0
 public static void CallMenu(Day day, Weather weather, Player player, Store store)
 {
     Messages.DisplayMainMenu(day, weather, player);
     menuInput = Console.ReadLine();
     if (menuInput == "1")
     {
         store.BuyFromStore(player);
         CallMenu(day, weather, player, store);
     }
     else if (menuInput == "2")
     {
         Messages.ShowInventory(player);
         Console.WriteLine();
         ValidateInventory(day, weather, player, store);
         Recipe recipe = new Recipe();
         recipe.RemoveItemsFromInventory(player);
         while (recipe.amountOfPitchers != 0)
         {
             player.lemonadeStand.pitchers.Add(new Pitcher(recipe));
             recipe.amountOfPitchers--;
         }
         player.lemonadeStand.pricePerCup = recipe.pricePerCup;
     }
     else
     {
         Messages.DisplayInvalidInput();
         Console.Clear();
         CallMenu(day, weather, player, store);
     }
 }