protected void OnMoveReady(ChessMove move)
 {
     if (MoveReady != null)
     {
         MoveReady(move);
     }
 }
 public HistoricalChessMove(ChessMove move, ChessPiece captures)
 {
     this.Move = move.Clone();
     this.Captures = captures;
 }
예제 #3
0
        public void Move(ChessMove move)
        {
            HistoricalChessMove historicalMove = new HistoricalChessMove(move, this.Board.Fields[move.To]);
            this.History.Add(historicalMove);

            // Update board
            this.Board.DoMove(move);

            // New turn
            this.Board.ChangeTurn();

            // Event
            OnBoardChanged();

            // After turn
            AfterTurnChanged();
        }
예제 #4
0
        public void ComputerMoveReady(ChessMove move)
        {
            DateTime stopTime = DateTime.Now;
            TimeSpan duration = stopTime - this.StartTime;

            OnExecutionTimeUpdated(duration);

            Move(move);
        }