vendor/gems/rubyzip-0.9.1/lib/quiz1/t/solutions/Thomas Leitner/solitaire.rb
# Moves the index one place down while treating the used array as circular list.
Moves the index one place down while treating the used array as circular list.
Moves the index one place down while treating the used array as circular list .
def move_down( index )
    if index == @deck.length - 1
      @deck[1..1] = @deck[index], @deck[1]
      @deck.pop
    else
      @deck[index], @deck[index + 1] = @deck[index + 1], @deck[index]
    end
  end
def move_down ( index ) if index == @deck . length - 1 @deck [ 1 .. 1 ] = @deck [ index ] , @deck [ 1 ] @deck . pop else @deck [ index ] , @deck [ index + 1 ] = @deck [ index + 1 ] , @deck [ index ] end end
Moves the index one place down while treating the used array as circular list.
Moves the index one place down while treating the used array as circular list .
index
<not_specific>