Last active
January 2, 2016 04:39
-
-
Save chadjemmett/8251607 to your computer and use it in GitHub Desktop.
Making a card deck.
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
| def new_deck | |
| all_cards = {} | |
| [:hearts, :diamonds, :clubs, :spades].each {|suit| all_cards[suit] = (1..13).to_a.shuffle!} | |
| return all_cards | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment