// // Summary: // Take the piece removing by it from the board. // // Parameters: // position: // The position of the array where the piece is. // // Returns: // The piece taked. public Piece TakePiece(TwoDimensionsArrayPosition position) { Piece piece = Pieces(position); _pieces[position.Row, position.Column] = null; piece.BoardPosition = null; return(piece); }
// // Summary: // Return the piece in the positon informed. // // Parameters: // position: // The TwoDimensionsArrayPosition where the piece should be. // // Returns: // The piece in the position; otherwise returns null. public Piece Pieces(TwoDimensionsArrayPosition position) { return(_pieces[position.Row, position.Column]); }