private void white_OnPlay(IGameStateForPlayer gamestate) { this.CurrentPlayer = WhitePlayer; }
//public event PlayDelegate OnPlay; public void Play(IGameStateForPlayer gameState) { //if (OnPlay!=null) //{ // OnPlay(gameState); //} CheckersBoard board=gameState as CheckersBoard; // System.Windows.Forms.MessageBox.Show((board == null) + ""); if(board!=null) { try { // DateTime begintime = DateTime.Now; SelectMove(board, this.Color, MaxSearchDepth,Int32.MinValue,Int32.MaxValue); // DateTime endtime = DateTime.Now; // TimeSpan span = endtime - begintime; // System.Windows.Forms.MessageBox.Show(span.ToString()); // }catch(Exception ex) { MessageBox.Show(ex.Message); } this.MakeAMove(selectedMove); } else throw new ArgumentException(); }
private void black_OnPlay(IGameStateForPlayer gamestate) { this.CurrentPlayer = BlackPlayer; }
public void Play(IGameStateForPlayer gameState) { if (OnPlay!=null) { OnPlay(gameState); } }