function snakes_stats ( m, n )

%*****************************************************************************80
%
%% snakes_stats() reports minimum, average and maximum game lengths.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 January 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the number of batches of games to play.
%
%    integer N, the number of games in each batch.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'snakes_stats():\n' );
  fprintf ( 1, '  Simulate N = %d one-player games of Snakes and Ladders,\n', n );
  fprintf ( 1, '  report minimum, mean, and maximum game lengths.\n' )
  fprintf ( 1, '  Do this M = %d times.\n', m )
%
%  Simulate N games.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Batch    Min   Mean   Max    Std\n' );
  fprintf ( 1, '\n' );

  for batch = 1 : m

    steps = zeros ( n, 1 );

    for game = 1 : n
      steps(game) = snakes_one_game ( );
    end
%
%  Report data.
%
    fprintf ( 1, '     %2d  %5d  %8.2f  %5d  %8.2f\n', ...
      batch, min ( steps ), mean ( steps ), max ( steps ), std ( steps ) );

  end

  return
end

