コード例 #1
0
        public static void HandleEvent()
        {
            userInput = Console.ReadLine();

            switch (userInput)
            {
            case "1":
                plant.Water();
                break;

            case "2":
                plant.Feed();
                break;

            case "3":
                plant.GiveSunshine();
                break;

            case "4":
                plant.CleanWeeds();
                break;

            default:
                Console.WriteLine("Please choose a number between 1 and 4.");
                HandleEvent();
                break;
            }
            plant.RandomizeEvent();
            CheckStatus();
        }