function bicycle_lock_test ( )

%*****************************************************************************80
%
%% BICYCLE_LOCK_TEST tests BICYCLE_LOCK.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    01 December 2018
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../bicycle_lock' )

  timestamp ( )
  fprintf ( 1, '\n' );
  fprintf ( 1, 'BICYCLE_LOCK_TEST\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  BICYCLE_LOCK tries to determine a bicycle lock combination.\n' );
  fprintf ( 1, '  A bicycle combination lock consists of 3 dials,\n' );
  fprintf ( 1, '  each having 10 symbols, 0 through 9.\n' );
  fprintf ( 1, '  We seek to determine the combination C.\n' );
%
%  Set the combination randomly.
%  We can think of the combination as a number between 0 and 999.
%
% rng ( 'shuffle' );
  c = randi ( [ 0, 999 ], 1, 1 );

  fprintf ( 1, '  The secret combination number is %d\n', c );
%
%  Try to determine the combination.
%
  step = bicycle_lock ( c );

  if ( step == -1 )
    fprintf ( 1, '\n' );
    fprintf ( 1, '  The combination was not found!\n' );
  else
    fprintf ( 1, '\n' );
    fprintf ( 1, '  The combination was found on step %d\n', step );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'BICYCLE_LOCK_TEST\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../bicycle_lock' )

  return
end

