Exemplo n.º 1
0
        public void ReadyToStartGame()
        {
            while (GameRunning == false)
            {
                Words  word     = new Words();
                Random nextWord = new Random();

                // Takes a word form the WordPool and get the length off that.
                WordToGuess = word.WordPool[nextWord.Next(0, word.WordPool.Length)];

                // I want it to be LowerCase so no matter how the user inputs the input it will check it,
                // and uppercase is easier to work with
                WordToGuessToLowerCase = WordToGuess.ToLower();

                DisplayToPlayer = new StringBuilder(WordToGuess.Length);
                for (int i = 0; i < WordToGuess.Length; i++)
                {
                    DisplayToPlayer.Append('-');
                }
                GameRunning = true;
            }
        }