Created
June 29, 2012 17:22
-
-
Save DonSchado/3019358 to your computer and use it in GitHub Desktop.
A deck of cards in ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suits = %w{s h d c} | |
ranks = %w{2 3 4 5 6 7 8 9 T J Q K A} | |
deck = suits.product(ranks) | |
def pull_card | |
deck.sample | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment