/// <summary>
        /// Starts the game.
        /// </summary>
        public static void Start()
        {
            Console.WriteLine();
            WordSelector wordSelector = new WordSelector();
            string word = wordSelector.SelectRandomWord();
            GuessCharacterHandler guessHandler = new GuessCharacterHandler();
            guessHandler.PlayRound(word);
            UserInputHandler wordGuesser = new UserInputHandler();
            wordGuesser.Word = word;

            while (guessHandler.GuessedCharsCounter < word.Length && wordGuesser.HasExited == false)
            {
                wordGuesser.HandleUserInput(guessHandler);
            }
        }
        public void RevealedCharsTest()
        {
            string word = "word";
            GuessCharacterHandler randerer = new GuessCharacterHandler();
            randerer.PlayRound(word);
            UserInputHandler wordGuesser = new UserInputHandler(); // used to be wg
            wordGuesser.Word = word;

            using (StringReader sr = new StringReader(string.Format("help{0}", Environment.NewLine)))
            {
                Console.SetIn(sr);
                wordGuesser.HandleUserInput(randerer);
                Assert.IsNotNull(randerer.RevealedChars);
            }
        }
        public void HandleUserInput_HelpTest()
        {
            string word = "word";
            GuessCharacterHandler randerer = new GuessCharacterHandler();
            randerer.PlayRound(word);
            UserInputHandler wordGuesser = new UserInputHandler(); // used to be wg
            wordGuesser.Word = word;

            using (StringReader sr = new StringReader(string.Format("help{0}", Environment.NewLine)))
            {
                Console.SetIn(sr);
                wordGuesser.HandleUserInput(randerer);
                int guestCharsCounter = randerer.GuessedCharsCounter;
                Assert.IsTrue(guestCharsCounter == 1);
            }
        }
        public void HandleUserInput_ExitTest()
        {
            string word = "word";
            GuessCharacterHandler randerer = new GuessCharacterHandler();
            randerer.PlayRound(word);
            UserInputHandler wordGuesser = new UserInputHandler(); // used to be wg
            wordGuesser.Word = word;

            using (StringWriter sw = new StringWriter())
            {
                using (StringReader sr = new StringReader(string.Format("exit{0}", Environment.NewLine)))
                {
                    Console.SetIn(sr);
                    Console.SetOut(sw);
                    wordGuesser.HandleUserInput(randerer);
                    Assert.AreEqual<string>("Enter your guess: \r\nGood bye!\r\n", sw.ToString());
                }
            }
        }
        public void HandleUserInput_CharTest()
        {
            string word = "word";
            GuessCharacterHandler randerer = new GuessCharacterHandler();
            randerer.PlayRound(word);
            UserInputHandler wordGuesser = new UserInputHandler(); // used to be wg
            wordGuesser.Word = word;

            using (StringWriter sw = new StringWriter())
            {
                using (StringReader sr = new StringReader(string.Format("z{0}exit", Environment.NewLine)))
                {
                    Console.SetIn(sr);
                    Console.SetOut(sw);
                    wordGuesser.HandleUserInput(randerer);
                    string testText = "Enter your guess: \r\nSorry! There are no unrevealed letters z\r\nThe secret word is:\r\n_ _ _ _ \r\n";
                    Assert.AreEqual<string>(testText, sw.ToString());
                }
            }
        }