public void ChoosingSugar(Player player, Inventory inventory, Wallet wallet) { Console.WriteLine("Type in the number of cups of sugar you want to buy"); option = Console.ReadLine(); switch (option) { case "8": Console.WriteLine("You bought 8 cups of sugar."); player.numberOfItemsBought = 8; cost = priceOf8CupsSugar; wallet.ValidatingFunds(player, cost); inventory.AddingSugar(player); buyingMore(player, inventory, wallet); break; case "20": Console.WriteLine("You bought 20 cups of sugar."); player.numberOfItemsBought = 20; cost = priceOf20CupsSugar; wallet.ValidatingFunds(player, cost); inventory.AddingSugar(player); buyingMore(player, inventory, wallet); break; case "48": Console.WriteLine("You bought 48 cups of sugar."); player.numberOfItemsBought = 48; cost = priceOf48CupsSugar; wallet.ValidatingFunds(player, cost); inventory.AddingSugar(player); buyingMore(player, inventory, wallet); break; default: Console.WriteLine("You typed in something wrong."); ChoosingSugar(player, inventory, wallet); break; } }