Example #1
0
 private void white_OnPlay(IGameStateForPlayer gamestate)
 {
     this.CurrentPlayer = WhitePlayer;
 }
Example #2
0
        //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();
        }
Example #3
0
 private void black_OnPlay(IGameStateForPlayer gamestate)
 {
     this.CurrentPlayer = BlackPlayer;
 }
Example #4
0
 public void Play(IGameStateForPlayer gameState)
 {
     if (OnPlay!=null)
     {
         OnPlay(gameState);
     }
 }