Ejemplo n.º 1
0
        /// <summary>
        /// The event handler for OnThinkingOutput.
        /// </summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event arguments.</param>
        private void GameSession_OnThinkingOutput(object sender, ThinkingOutputEventArgs e)
        {
            if (_thinkingOutputEnabled)
            {
                var depth      = e.AIResult.Depth;
                var score      = ColorOperations.ToSign(e.AIResult.Color) * e.AIResult.Score;
                var time       = (int)(e.AIResult.Time * 100);
                var totalNodes = e.AIResult.Stats.TotalNodes;

                SendData($"{depth} {score} {time} {totalNodes} {e.AIResult.PVNodes}");
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// The event handler tor OnThinkingOutput.
 /// </summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event arguments.</param>
 private void AICore_OnThinkingOutput(object sender, ThinkingOutputEventArgs e)
 {
     OnThinkingOutput?.Invoke(this, e);
 }