Skip to content

Instantly share code, notes, and snippets.

@glassbead0
Created August 11, 2014 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glassbead0/5e9b7bec922a6977c278 to your computer and use it in GitHub Desktop.
Save glassbead0/5e9b7bec922a6977c278 to your computer and use it in GitHub Desktop.
def perfect_shuffle # technically, a perfect faro out-shuffle
@temp_deck = []
b = 26
26.times do |a|
@temp_deck << @cards[a]
@temp_deck << @cards[b]
b += 1
end
@cards = @temp_deck
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment