Skip to content

Instantly share code, notes, and snippets.

@supervoron1
Created September 2, 2019 13:02
Show Gist options
  • Save supervoron1/7cc1fa920eaafea429bf433c7e51336e to your computer and use it in GitHub Desktop.
Save supervoron1/7cc1fa920eaafea429bf433c7e51336e to your computer and use it in GitHub Desktop.
generate_cards
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