vendor/gems/rubyzip-0.9.1/lib/quiz1/t/solutions/Jim Menard/solitaire_cypher.rb
# Return the output number (not letter). Convert the top card to it's
# value and count down that many cards from the top of the deck, with the
# top card itself being card number one. Look at the card immediately
# after your count and convert it to a letter. This is the next letter in
# the keystream. If the output card is a joker, no letter is generated
# this sequence. This step does not alter the deck.
Return the output number (not letter). Convert the top card to it's
value and count down that many cards from the top of the deck, with the
top card itself being card number one. Look at the card immediately
after your count and convert it to a letter. This is the next letter in
the keystream. If the output card is a joker, no letter is generated
this sequence. This step does not alter the deck.
Return the output number ( not letter ) . Convert the top card to it ' s value and count down that many cards from the top of the deck with the top card itself being card number one . Look at the card immediately after your count and convert it to a letter . This is the next letter in the keystream . If the output card is a joker no letter is generated this sequence . This step does not alter the deck .
def output_number
	i = @cards[0].to_i
	i -= @cards.length if i >= @cards.length
	num = @cards[i].to_i
	num -= 26 if num > 26
	num
    end
def output_number i = @cards [ 0 ] . to_i i -= @cards . length if i >= @cards . length num = @cards [ i ] . to_i num -= 26 if num > 26 num end
Return the output number (not letter).
Return the output number ( not letter ) .