function boundary_word_transform_test ( )

%*****************************************************************************80
%
%% boundary_word_transform_test() tests boundary_word_transform().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 May 2020
%
%  Author:
%
%    John Burkardt
%
  transforms = [ ...
    'udlr'; ...
    'udrl'; ...
    'dulr'; ...
    'durl'; ...
    'lrdu'; ...
    'lrud'; ...
    'rlud'; ...
    'rldu' ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_word_transform_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  boundary_word_transform() returns the boundary word of a \n' );
  fprintf ( 1, '  transformed polyomino.\n' );
  fprintf ( 1, '\n' );

  c = 'F';
  s = pentomino_to_boundary_word ( c );
  fprintf ( 1, '  Polyomino "%s" has boundary word "%s"\n', c, s );

  for i = 1 : 8
    udlr = transforms(i,1:4);
    s2 = boundary_word_transform ( s, udlr );
    fprintf ( 1, '  "%s" transforms boundary word to "%s"\n', udlr, s2 )
    boundary_word_plot ( s2 );
    filename = sprintf ( '%s_%s_transform.png', s2, udlr );
    print ( '-dpng', filename );
    fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  end

  return
end

