Exemple #1
0
        public UnoBotPlugin(IConnectionManager connMgr, JObject config)
        {
            ConnectionManager = connMgr;
            Config            = new UnoBotConfig(config);

            CurrentMessageJson  = new StringBuilder();
            LinesLeftInMessage  = 0;
            BotCommandRegexNick = null;
            BotCommandRegex     = null;

            ConnectionManager.ChannelMessage += HandleChannelMessage;
            ConnectionManager.QueryMessage   += HandleQueryMessage;

            CurrentHand        = new List <Card>();
            CurrentCardCounts  = new Dictionary <string, int>();
            CurrentPlayers     = new HashSet <string>();
            NextPlayer         = null;
            NextButOnePlayer   = null;
            PreviousPlayer     = null;
            LastHandCount      = -1;
            ColorRequest       = null;
            DrewLast           = false;
            DrawsSinceLastPlay = 0;
            Randomizer         = new Random();
        }
Exemple #2
0
 public virtual void ReloadConfiguration(JObject newConfig)
 {
     Config = new UnoBotConfig(newConfig);
     PostConfigReload();
 }