function basketball_dynamic_test ( )

%*****************************************************************************80
%
%% basketball_dynamic_test() tests basketball_dynamic().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    31 January 2025
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../basketball_dynamic' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'basketball_dynamic_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  basketball_dynamic() computes the number of ways\n' );
  fprintf ( 1, '  of achieving a particular score in basketball.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  We assume scoring options are:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  +1 for a free throw.\n' );
  fprintf ( 1, '  +2 for a regular basket;\n' );
  fprintf ( 1, '  +3 for a three pointer;\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   Score                  Ways\n' );
  fprintf ( 1, '\n' );

  n = 20;
  s = basketball_dynamic ( n );

  for i = 0 : n
    fprintf ( 1, '  %6d  %15d\n', i, s(i+1) );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, 'basketball_dynamic_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../basketball_dynamic' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end
