Exemplo n.º 1
0
        public BotCore(Config _conf)
        {
            conf = _conf;

            hanshin  = new Hanshin();
            rat      = new RatEvaluator();
            rnd      = new Random(Environment.TickCount + 334);
            launched = DateTime.Now;

            sent_procon    = DateTime.Now.AddDays(-1);
            stop_cmd_count = 0;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 阪神算
        /// </summary>
        public Hanshin(string _filename = "hanshin.json")
        {
            filename = _filename;
            if (System.IO.File.Exists(filename))
            {
                hdb = JsonMgr <HanshinDB> .Load(filename);
            }
            else
            {
                hdb          = new HanshinDB();
                hdb.map      = new Dictionary <int, string>();
                hdb.map[334] = "334";
                hdb.map[29]  = "33-4";
                JsonMgr <HanshinDB> .Save(hdb, filename);
            }

            rat = new RatEvaluator();
        }