function step = snakes_one_game_and_plot ( )

%*****************************************************************************80
%
%% snakes_one_game_and_plot() plays and plots Snakes and Ladders once.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 July 2016
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    integer STEP, the number of steps taken.
%

%
%  Define the snakes and ladders.
%
  [ snake, ladder ] = snakes_ladder_setup ( );

  v = zeros ( 101, 1 );

  step = 0;
  i = 0;
  O = 1;
  v(i+O) = 1;

  snakes_plot ( step, v );

  pause ( );

  while ( i < 100 )

    step = step + 1;
    i_old = i;
    v(i+O) = 0;
    [ i, d ] = snakes_move ( i, snake, ladder );
    v(i+O) = 1;
    snakes_plot ( step, v );
    pause ( );

  end

  return
end
