function [ step, seed ] = snakes_one_game ( seed )

%*****************************************************************************80
%
%% SNAKES_ONE_GAME plays Snakes and Ladders once.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    17 July 2016
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input/output, integer SEED, a seed for the random number generator.
%
%    Output, integer STEP, the number of steps required for a random simulated
%    one-player game of Snakes and Ladders.
%
  if ( nargin < 1 )
    seed = 123456789;
  end
%
%  Define the snakes and ladders.
%
  [ snake, ladder ] = snakes_ladder_setup ( );
%
%  Begin the simulation.
%
  step = 0;
  i = 0;

  while ( i < 100 )

    step = step + 1;
    [ i, d, seed ] = snakes_move ( i, snake, ladder, seed );

  end

  return
end
