예제 #1
0
파일: Program.cs 프로젝트: chrisdurtschi/ai
        static void Main(string[] args)
        {
            string word = String.Empty;
            while (String.IsNullOrEmpty(word))
            {
                Console.Out.Write("Enter a word, any word: ");
                string input = Console.In.ReadLine();
                if (Regex.IsMatch(input, "([a-z]|[A-Z])+"))
                    word = input;
                else
                    Console.Out.WriteLine("Word must contain only letters A-Z");
            }

            WordGuesser guesser = new WordGuesser(1000, 10000, 0.2, 0.6);
            guesser.Guess(word);

            Console.In.ReadLine();
        }
예제 #2
0
파일: Program.cs 프로젝트: AllieGardiner/ai
        static void Main(string[] args)
        {
            string word = String.Empty;

            while (String.IsNullOrEmpty(word))
            {
                Console.Out.Write("Enter a word, any word: ");
                string input = Console.In.ReadLine();
                if (Regex.IsMatch(input, "([a-z]|[A-Z])+"))
                {
                    word = input;
                }
                else
                {
                    Console.Out.WriteLine("Word must contain only letters A-Z");
                }
            }

            WordGuesser guesser = new WordGuesser(1000, 10000, 0.2, 0.6);

            guesser.Guess(word);

            Console.In.ReadLine();
        }