コード例 #1
0
 static public string RenderForUI(this BotStatistics statistics) =>
 null == statistics ? null :
 string.Join(Environment.NewLine,
             new[]
 {
     "started at: " + statistics?.StartTimeCal.ToLongTimeString(),
     "bot step count: " + statistics?.BotStepCount,
     "---- reports read ----",
     "report.summary: " + statistics?.ReportSummaryReadCount +
     ", report.detail: " + statistics?.ReportDetailReadCount,
     "attacks sent: " + statistics?.AttackSentCount,
 });
コード例 #2
0
ファイル: Server.cs プロジェクト: e2tox/topbit
        public bool LogBotSubmit(Bot bot, string work)
        {
            BotInfo botInfo;

            if (!BotStatistics.TryGetValue(bot.Id, out botInfo))
            {
                botInfo = new BotInfo(bot);
                lock (BotStatistics)
                {
                    BotStatistics[bot.Id] = botInfo;
                }
            }
            return(botInfo.SubmitWork(work));
        }
コード例 #3
0
ファイル: Server.cs プロジェクト: e2tox/topbit
        public void LogBotWork(Bot bot, string work)
        {
            BotInfo botInfo;

            if (!BotStatistics.TryGetValue(bot.Id, out botInfo))
            {
                botInfo = new BotInfo(bot);
                lock (BotStatistics)
                {
                    BotStatistics[bot.Id] = botInfo;
                }
            }
            Work w = Work.Parse(work);

            botInfo.RequestWork(work, w.PreviousHash);
        }
コード例 #4
0
ファイル: Bot.cs プロジェクト: NEVEROYATNII/Funky
 internal static void Reset()
 {
     Class=null;
              Character=new CharacterCache();
              Combat=new CombatCache();
              Target=new TargetHandler();
              NavigationCache=new Navigation();
              Stats=new BotStatistics();
              shuttingDownBot=false;
 }
コード例 #5
0
ファイル: Server.cs プロジェクト: e2tox/topbit
        public decimal TestBotSpeed(int botId)
        {
            BotInfo botInfo;

            return(BotStatistics.TryGetValue(botId, out botInfo) ? botInfo.Speed : 0);
        }