function play_many ( n )

%*****************************************************************************80
%
%% play_many() plays many games of clock solitaire.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 April 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of games to play.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'play_many() will play many clock solitaire games\n' );

  wins = 0;
  for i = 1 : n
    win = play ( );
    if ( win )
      wins = wins + 1;
    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

