function boundary_word_range_test ( )

%*****************************************************************************80
%
%% boundary_word_range_test() tests boundary_word_range().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 May 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_word_range_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  boundary_word_range() determines the range of a polyomino\n' );
  fprintf ( 1, '  defined by a given boundary word.\n' );
  fprintf ( 1, '\n' );

  for i = 1 : 5
    if ( i == 1 )
      s = 'rrururullulddldd';
    elseif ( i == 2 )
      s = 'rurdrururulurullddlldldd';
    elseif ( i == 3 )
      s = 'rurdruuluulldrdldd';
    elseif ( i == 4 )
      s = 'rurdrdldrdrurulururdrurululdlulurululdldrdldluldldrd';
    else
      s = 'rurdruuuldluldldrd';
    end
    [ xmin, xmax, ymin, ymax ] = boundary_word_range ( s );
    fprintf ( 1, '  Polyomino defined by "%s" has %d <= x <= %d, %d <= y <= %d\n', ...
      s, xmin, xmax, ymin, ymax );
  end

  return
end

