function duel_simulation_test ( )

%*****************************************************************************80
%
%% DUEL_SIMULATION_TEST tests DUEL_SIMULATION.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    25 November 2018
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../duel_simulation' )

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'DUEL_SIMULATION_TEST:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test DUEL_SIMULATION.\n' );

  p = [ 0.25, 0.30 ];
  duel_num = 100;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Player 1 accuracy: %g\n', p(1) );
  fprintf ( 1, '  Player 2 accuracy: %g\n', p(2) );
  fprintf ( 1, '  Number of duels simulated = %d\n', duel_num );
  [ s, turn_average ] = duel_simulation ( p, duel_num );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Probability player 1 wins: %g\n', s(1) );
  fprintf ( 1, '  Probability player 2 wins: %g\n', s(2) );
  fprintf ( 1, '  Average number of shots fired = %g\n', turn_average );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'DUEL_SIMULATION_TEST:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );


  rmpath ( '../duel_simulation' )

  return
end
