示例#1
0
        public void Play()
        {
            Console.WriteLine("What tube line do you want anagrams for?");

            var chosenTubeLine = Console.ReadLine();

            Console.WriteLine($"Unscramble these anagrams of stops along the {chosenTubeLine} Line:");

            var stationsForLine = _tflApi.GetStationsForLine(chosenTubeLine);

            var anagram = AnagramGenerator.GenerateAnagram(_picker.Pick(stationsForLine));

            Console.WriteLine(anagram);

            var guess = Console.ReadLine();

            if (guess != null && AreAnagrams(anagram, guess))
            {
                Console.WriteLine("Correct!");
            }
            else
            {
                Console.WriteLine($"No {guess} is wrong.");
            }
        }