function craps_game_test ( )

%*****************************************************************************80
%
%% craps_game_test() tests craps_game().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 July 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'craps_game_test():\n' );
  fprintf ( 1, '  craps_game() simulates a game of craps.\n' );

  bankroll = 1000.0;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Player starts with bankroll of %g\n', bankroll );

  for i = 1 : 10
    bet = bankroll / 2.0;
    [ result, roll, point ] = craps_game ( bet );
    bankroll = bankroll + result;

    fprintf ( 1, '\n' );
    fprintf ( 1, '  The player bet $%g\n', bet );
    fprintf ( 1, '  The first roll had the value %d\n', point );
    fprintf ( 1, '  There were a total of %d rolls\n', roll );
    fprintf ( 1, '  The player''s result was %g\n', result );
    fprintf ( 1, '  The player''s bankroll is now %g\n', bankroll );

  end

  return
end

