function boundary_word_moment_test ( )

%*****************************************************************************80
%
%% boundary_word_moment_test() tests boundary_word_moment().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 May 2020
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    George Bell,
%    The dynamics of spinning polyominoes,
%    Gathering for Gardner, G4G13.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_word_moment_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  boundary_word_moment() returns the moment of inertia of the \n' );
  fprintf ( 1, '  polyomino defined by a given boundary word.\n' );
  fprintf ( 1, '\n' );

  s = 'rrururullulddldd';
  moment = boundary_word_moment ( s );
  fprintf ( 1, '  Polyomino defined by "%s" has moment %g\n', s, moment );

  for i = 1 : 12
    c = pentomino_symbol ( i );
    s = pentomino_to_boundary_word ( c );
    moment_exact = pentomino_moment ( c );
    moment_computed = boundary_word_moment ( s );
    fprintf ( 1, '  %s pentomino defined by "%s" has moment %g, exact is %g\n', ...
      c, s, moment_computed, moment_exact );
  end

  return
end

