function polyomino_random_test ( )

%*****************************************************************************80
%
%% polyomino_random_test() tests polyomino_random().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 June 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polyomino_random_test():\n' );
  fprintf ( 1, '  polyomino_random() generates a random polyomino.\n' );

  for i = 1 : 5

    squares = randi ( [ 5, 15 ] );
    p = polyomino_random ( squares );
    [ m, n ] = size ( p );
    label = sprintf ( ...
      '  Random polyomino of %d squares on %d by %d grid', squares, m, n );
    polyomino_print ( p, label );
    label = sprintf ( 'polyomino random #%d', i );
    filename = sprintf ( 'polyomino_random_%d.png', i );
    polyomino_display ( p, label, filename );

  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polyomino_random_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

