コード例 #1
0
ファイル: ComputerPlayer.cs プロジェクト: vovan3481/Reversi
        //ход компьютера (
        private void DoNextMove()
        {
            MoveSolver solver = new MoveSolver(this, this.Depth);
            int        rowIndex;
            int        columnIndex;

            solver.GetNextMove(out rowIndex, out columnIndex); //устанавливает значени фишки на поле из класса MoveSolver
            if (!this.Game.IsStopped && !this.Game.IsPaused && (rowIndex >= 0) && (columnIndex >= 0))
            {
                this.Game.Board.SetFieldColor(rowIndex, columnIndex, this.Color);//замена цвета поля(установка фишки)
            }
        }
コード例 #2
0
        private void DoNextMove()
        {
            MoveSolver solver = new MoveSolver(this, this.Depth);
            int        rowIndex;
            int        columnIndex;

            solver.GetNextMove(out rowIndex, out columnIndex);
            if (!this.Game.IsStopped && !this.Game.IsPaused && (rowIndex >= 0) && (columnIndex >= 0))
            {
                this.Game.Board.SetFieldColor(rowIndex, columnIndex, this.Color);
            }
        }