// // Calculates a computer move. // Note: Executed in the worker thread. // private void CalculateComputerMove() { int invoker = 1; if (invoker == 1) { // Load the AI parameters. this.SetAIParameters(); // Find the best available move. ComputerMove move = this.GetBestMove(this.board); MessageBox.Show(null, move.row.ToString(), move.col.ToString(), MessageBoxButtons.OK); // Perform a callback to make the move. Object[] args = { move.row, move.col }; MakeComputerMoveDelegate moveDelegate = new MakeComputerMoveDelegate(this.MakeComputerMove); this.BeginInvoke(moveDelegate, args); } else { // Load the AI parameters. this.SetAIParameters(); // Find the best available move. ComputerMove move = this.GetBestMove(this.board); // Perform a callback to make the move. Object[] args = { move.row, move.col }; MessageBox.Show(null, "test", "tess", MessageBoxButtons.OK); // MakeComputerMoveDelegate moveDelegate = new MakeComputerMoveDelegate(this.MakeComputerMove); // this.BeginInvoke(moveDelegate, args); } }
// // Calculates a computer move. // Note: Executed in the worker thread. // private void CalculateComputerMove() { // Load the AI parameters. this.SetAIParameters(); // Find the best available move. ComputerMove move = this.GetBestMove(this.board); // Perform a callback to make the move. Object[] args = { move.row, move.col }; MakeComputerMoveDelegate moveDelegate = new MakeComputerMoveDelegate(this.MakeComputerMove); this.BeginInvoke(moveDelegate, args); }