Example #1
0
 private void InitE2eResult()
 {
     if (Flags.IsE2eResultInitRequired)
     {
         E2eResult             = new E2eResult(this);
         E2eResult.Engine1Name = Player1.Engine.EngineName;
         E2eResult.Engine2Name = Player2.Engine.EngineName;
     }
 }
Example #2
0
        public void UpdateE2eResult()
        {
            if (E2eResult == null)
            {
                return;
            }

            switch (GameResultE)
            {
            case GameResultE.WhiteWin:
                if (Flags.IsEngine1White)
                {
                    E2eResult.Engine1WhiteWin++;
                    E2eResult.AddMatch("1", "0", true);
                }
                else
                {
                    E2eResult.Engine2WhiteWin++;
                    E2eResult.AddMatch("0", "1", false);
                }
                break;

            case GameResultE.WhiteLose:
                if (Flags.IsEngine1White)
                {
                    E2eResult.Engine2BlackWin++;
                    E2eResult.AddMatch("0", "1", true);
                }
                else
                {
                    E2eResult.Engine1BlackWin++;
                    E2eResult.AddMatch("1", "0", false);
                }
                break;

            case GameResultE.Draw:
                E2eResult.Draw++;
                if (Flags.IsEngine1White)
                {
                    E2eResult.AddMatch("1/2", "1/2", true);
                }
                else
                {
                    E2eResult.AddMatch("1/2", "1/2", false);
                }
                break;

            case GameResultE.NoResult:
                E2eResult.NoResult++;
                if (Flags.IsEngine1White)
                {
                    E2eResult.AddMatch("0", "0", true);
                }
                else
                {
                    E2eResult.AddMatch("0", "0", false);
                }
                break;

            default:
                break;
            }
            TestDebugger.Instance.WriteLog("TotalMatches : " + E2eResult.TotalMatches + " - " + DateTime.Now.ToLongDateString() + " - " + DateTime.Now.ToLongTimeString());
        }