Created
September 2, 2019 13:02
-
-
Save supervoron1/7cc1fa920eaafea429bf433c7e51336e to your computer and use it in GitHub Desktop.
generate_cards
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
def generate_cards | |
Card::CARD_SUITES.each_with_object([]) do |suit, piece| | |
Card::CARD_VALUES.each do |rank| | |
piece << Card.new(suit, rank) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment