function football_dynamic_test ( )

%*****************************************************************************80
%
%% football_dynamic_test() tests football_dynamic().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    21 September 2022
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../football_dynamic' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'football_dynamic_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  football_dynamic() computes the number of ways\n' );
  fprintf ( 1, '  of achieving a particular score in football.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  We assume scoring options are:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  +1 for a one point safety (returned conversion\n' );
  fprintf ( 1, '     after the other team scores a touchdown.\n' );
  fprintf ( 1, '  +2 for a safety;\n' );
  fprintf ( 1, '  +3 for a field goal;\n' );
  fprintf ( 1, '  +6 for a touchdown with no followup;\n' );
  fprintf ( 1, '  +7 for a touchdown with a point bonus;\n' );
  fprintf ( 1, '  +8 for a touchdown with two point conversion;\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   Score                  Ways\n' );
  fprintf ( 1, '\n' );
%
%  You get a score of N points by
%    N-1 + a 1 point safety,
%    N-2 + a safety, or
%    N-3 + a field goal, or
%    N-6 + a touchdown with no followup
%    N-7 + a touchdown with a point bonus, or
%    N-8 + a touchdown with two point conversion.
%
  n = 50;
  s = football_dynamic ( n );

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

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

  rmpath ( '../football_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
