コード例 #1
0
        private void exposeFriendName()
        {
            string friendName = EngineManager.GetFriendToGuess().Name;

            labelUserInteraction.ForeColor = Color.Red;
            labelUserInteraction.Text      = string.Format("The friend's name is: {0}", friendName);
        }
コード例 #2
0
        private void checkGuess()
        {
            bool   isUserGuessedRight, isStrikeThree;
            string friendName;

            // validate user guess
            isUserGuessedRight = EngineManager.IsUserGuessCorrect(textBoxUserGuess.Text);
            isStrikeThree      = EngineManager.IsUserWorthyExtraHealth(isUserGuessedRight);
            EngineManager.UpdateUserDueToHisGuess(isUserGuessedRight);
            friendName = EngineManager.GetFriendToGuess().Name;
            updateLabelUserInteractionAboutCurrentRound(isUserGuessedRight, isStrikeThree, friendName);
            prepareNextRound();
        }