コード例 #1
0
 public static void CheckStatus()
 {
     plant.CheckAlive();
     if (plant.IsAlive)
     {
         UpdateState();
         RenderOption();
     }
     else
     {
         Console.WriteLine("GAME OVER!!");
         Console.WriteLine($"Sorry, {plant.Name} died...");
         Console.WriteLine("Play again? (Y/N)");
         string userInput = Console.ReadLine().ToUpper();
         if (userInput == "Y")
         {
             plant.Reset();
             Main();
         }
         else
         {
             Console.WriteLine("See you again!");
         }
     }
 }