function play_many ( n )

%*****************************************************************************80
%
%% play_many() plays many games of clock solitaire.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 November 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of games to play.
%
  verbose = false;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'play_many() will play %d clock solitaire games.\n', n );

  wins = 0;
  for game = 1 : n
    win = play ( );
    if ( win )
      wins = wins + 1;
      if ( verbose )
        fprintf ( 1, '  Game %d, wins = %d\n', game, wins );
      end
    end
  end

  fprintf ( 1, '  Won %d out of %d\n', wins, n );
  fprintf ( 1, '  Win ratio is       %g\n', wins / n );
  fprintf ( 1, '  Expected win ratio %g\n', 1.0 / 13.0 );

  return
end

