/// <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 static void Restart() { Console.WriteLine(); string word = WordSelector.SelectRandomWord(); //Console.WriteLine(word); WordInitializator.BegginingOfTheGameInitialization(word); WordGuesser wg = new WordGuesser() { Word = word }; while (WordInitializator.num1 < word.Length && WordGuesser.IsExited == false) { wg.GuessLetter(); } }