function snakes_matrix_test ( )

%*****************************************************************************80
%
%% snakes_matrix_test() tests snakes_matrix().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    02 January 2020
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../snakes_matrix' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'snakes_matrix_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test snakes_matrix().\n' );
%
%  Evaluate the transition matrix for Snakes and Ladders.
%
  a = snakes_matrix ( );
%
%  Use spy to draw an image of the matrix.
%
  spy ( a );
  title ( 'The Snakes and Ladders 101 Sparse Matrix' )

  filename = 'snakes_matrix_test.png';
  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved in "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'snakes_matrix_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  rmpath ( '../snakes_matrix' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

