コード例 #1
0
        private void SendHintToSubbedUsers(string channelName, QuizGame quizGame)
        {
            if (quizGame.ReadyForHint())
            {
                foreach (KeyValuePair <string, List <string> > subbedUsers in m_subscribedUsers)
                {
                    if (subbedUsers.Value.Contains(channelName))
                    {
                        TwitchClient.GetInstance().SendWhisperMessage(subbedUsers.Key, GetGameHintMessage(channelName));
                    }
                }

                quizGame.SetHintCooldown(HINT_COOLDOWN);
            }
        }
コード例 #2
0
        private void PrepareNewGameIfReady(string channelName, QuizGame quizGame)
        {
            if (quizGame.ReadyForNewGame())
            {
                // Get a new question for this quiz game.
                QuizGameInfo newGameQuestion = GetNewQuestion(channelName);

                // Set the hint cooldown
                quizGame.SetHintCooldown(HINT_COOLDOWN);

                // Set the quiz up
                quizGame.StartNewGame(newGameQuestion);

                // Send message in channel
                SendNewGameMessage(channelName);
            }
        }