Created
November 26, 2018 23:08
This file contains 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(Clubs Spades Diamonds Hearts) | |
numbers = %w(Ace Two Three Four Five Six Seven Eight Nine Ten Jack Queen King) | |
cards = suits.flat_map do |suit| | |
numbers.map do |num| | |
"#{num} of #{suit}" | |
end | |
end | |
cards.sample |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment