Exemple #1
0
        public string UpdateGuess(ChatUser chatUser, string guess)
        {
            if (CurrentPlayers.ContainsKey(chatUser.DisplayName))
            {
                CurrentPlayers[chatUser.DisplayName] = guess.ToLower().Single();
                return($"You updated your guess to {guess}, {chatUser.DisplayName}.");
            }

            return($"You aren't playing. Stop it, {chatUser.DisplayName}.");
        }
Exemple #2
0
        public string AttemptToLeave(ChatUser chatUser)
        {
            if (!IsRunning)
            {
                return("You can't leave a game that isn't being played."); // TODO: this needs to be a whisper
            }

            if (_questionAskingStarted)
            {
                return("The questions have started, you can't leave."); // TODO: this needs to be a whisper
            }

            if (CurrentPlayers.ContainsKey(chatUser.DisplayName))
            {
                CurrentPlayers.Remove(chatUser.DisplayName);
                return($"{chatUser.DisplayName} has quit the game.");
            }

            return($"You aren't in this game, {chatUser.DisplayName}"); // TODO: this needs to be a whisper
        }