Created
January 4, 2014 04:27
-
-
Save chadjemmett/8251686 to your computer and use it in GitHub Desktop.
Deal cards method
The @all_cards is an instance variable of a hash. Outside of the method.
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 deal_cards | |
| suit = [:hearts, :diamonds, :clubs, :spades] | |
| return @all_cards[suit.sample].pop | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment