Esempio n. 1
0
        private static void PrintingTheEndOfTheGame()
        {
            Console.WriteLine("Game Ended");

            if (_hangman.IsCorrectCompleteWord())
            {
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine($"Good work, you completed the whole word \"{_hangman.SecretWord}\"!");
                Console.ResetColor();
            }
            else
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Sorry, you didn't get the complete word, good luck next time!");

                Console.WriteLine("  +---+  " + "\n\r" +
                                  "  |   |  " + "\n\r" +
                                  "  O   |  " + "\n\r" +
                                  " /|\\  |  " + "\n\r" +
                                  " / \\  |  " + "\n\r" +
                                  "      |  " + "\n\r" +
                                  "=========");
                Console.WriteLine();
                Console.WriteLine($"The correct word is \"{_hangman.SecretWord}\" ");
                Console.ResetColor();
            }
        }