コード例 #1
0
        public static void StoneFinalChoice()
        {
            Console.ForegroundColor = ConsoleColor.White;
            string input         = Console.ReadLine();
            string playerCommand = input.ToUpper();

            Console.ForegroundColor = ConsoleColor.Blue;
            if (playerCommand == "YES" || playerCommand == "Y")
            {
                TypeLine("\nYou throw the stone as hard as you can at the mirror. \n");
                System.Threading.Thread.Sleep(500);
                TypeLine("There is a huge flash of light. And then--\n");
                System.Threading.Thread.Sleep(1000);
                TypeLine("Where the ");
                MenuText.ChangeTextColor("MIRROR", ConsoleColor.Red);
                TypeLine(" stood, there is now a doorway, with a spiral staircase that descends into darkness. \n");
                System.Threading.Thread.Sleep(500);
                TypeLine("You take a deep breath and begin your descent.\n");
                MenuText.YouWin();
            }
            else if (playerCommand == "NO" || playerCommand == "N")
            {
                TypeLine("\nYou put the ");
                MenuText.ChangeTextColor("STONE", ConsoleColor.Red);
                TypeLine(" back into your pocket and step away from the ");
                MenuText.ChangeTextColor("MIRROR", ConsoleColor.Red);
                TypeLine(". \n");
            }
            else
            {
                Console.WriteLine($"\"{playerCommand}\" is not a proper command. Please type YES or NO.");
                StoneFinalChoice();
            }
        }