Example #1
0
        static void Main(string[] args)
        {
            GameBoard newGameBoard = new GameBoard();
            WordsForGame words = new WordsForGame();
            _answer = words.wordGenerator();
            _blankAnswer = words.blankWord(_answer);

            //debug
            //Console.WriteLine(_answer);

            while(_blankCount > 0 && _playerLives >= 0)
            {
                newGameBoard.drawGallows(_playerLives);
                Console.WriteLine(_blankAnswer);
                Console.WriteLine("\nEnter a letter to guess");
                guess = Console.ReadKey().KeyChar;
                words.checkGuessAgainstWord(_answer, _blankAnswer, guess);
                
                Console.Clear();
            }

            if (_blankCount == 0)
            {
                Console.WriteLine("Hooray, you win");
            }
            
            else
            {
                Console.WriteLine("Something has gone horribly wrong");
            }

            Console.ReadLine();
        }