vendor/gems/rubyzip-0.9.1/lib/quiz1/t/solutions/Jim Menard/solitaire_cypher.rb
# Perform a triple cut around the two jokers. All cards above the top
# joker move to below the bottom joker and vice versa. The jokers and the
# cards between them do not move.
Perform a triple cut around the two jokers. All cards above the top
joker move to below the bottom joker and vice versa. The jokers and the
cards between them do not move.
Perform a triple cut around the two jokers . All cards above the top joker move to below the bottom joker and vice versa . The jokers and the cards between them do not move .
def triple_cut
	i = @cards.index(@joker_a)
	j = @cards.index(@joker_b)
	j, i = i, j if j < i	
	@cards = slice(j+1, -1) + slice(i, j) + slice(0, i-1)
    end
def triple_cut i = @cards . index ( @joker_a ) j = @cards . index ( @joker_b ) j , i = i , j if j < i @cards = slice ( j + 1 , - 1 ) + slice ( i , j ) + slice ( 0 , i - 1 ) end
Perform a triple cut around the two jokers.
Perform a triple cut around the two jokers .
# make sure i < j