예제 #1
0
        public void Go()
        {
            var goParams = new Uci.UciGoParameters
            {
                BlackInc  = this.TimeSettings.MoveIncrement * 1000,
                BlackTime = Clock.InfiniteTime ? (long?)null : Clock.TimeRemainingBlack,
                Depth     = TimeSettings.Depth,
                Infinite  = TimeSettings.TimeModeMachine == TimeMode.Infinite,
                MoveTime  = TimeSettings.TimeModeMachine == TimeMode.TimePerMove ? TimeSettings.TimePerMove : null,
                Nodes     = TimeSettings.TimeModeMachine == TimeMode.NodeCount ? TimeSettings.NodeCount : null,
                WhiteInc  = TimeSettings.MoveIncrement * 1000,
                WhiteTime = Clock.InfiniteTime ? (long?)null : Clock.TimeRemainingWhite,
            };

            if (Board.PlayerTurn == Color.White)
            {
                PlayerWhite.Play(goParams);
                Clock.StartClock(Color.White);
            }
            else
            {
                PlayerBlack.Play(goParams);
                Clock.StartClock(Color.Black);
            }
        }
예제 #2
0
        public void Go()
        {
            var goParams = new Uci.UciGoParameters
            {
                BlackInc = this.TimeSettings.MoveIncrement * 1000,
                BlackTime = Clock.InfiniteTime ? (long?)null : Clock.TimeRemainingBlack,
                Depth = TimeSettings.Depth,
                Infinite = TimeSettings.TimeModeMachine == TimeMode.Infinite,
                MoveTime = TimeSettings.TimeModeMachine == TimeMode.TimePerMove ? TimeSettings.TimePerMove : null,
                Nodes = TimeSettings.TimeModeMachine == TimeMode.NodeCount ? TimeSettings.NodeCount : null,
                WhiteInc = TimeSettings.MoveIncrement * 1000,
                WhiteTime = Clock.InfiniteTime ? (long?)null : Clock.TimeRemainingWhite,
            };

            if (Board.PlayerTurn == Color.White)
            {
                PlayerWhite.Play(goParams);
                Clock.StartClock(Color.White);
            }
            else
            {
                PlayerBlack.Play(goParams);
                Clock.StartClock(Color.Black);
            }
        }