vendor/gems/rubyzip-0.9.1/lib/quiz1/t/solutions/Bill Guindon/solitaire.rb
# does as many cuts as you give it.
does as many cuts as you give it.
does as many cuts as you give it .
def cut_cards(cuts)
    cards = []
    loc = 0
    [cuts].flatten.each_with_index do |cut, idx|
      cards[idx] = @cards[loc...cut]
      loc = cut
    end
    cards << @cards[loc...@cards.length]
  end
def cut_cards ( cuts ) cards = [ ] loc = 0 [ cuts ] . flatten . each_with_index do | cut , idx | cards [ idx ] = @cards [ loc ... cut ] loc = cut end cards << @cards [ loc ... @cards . length ] end
does as many cuts as you give it.
does as many cuts as you give it .
cuts
<not_specific>