You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
351 B
Ruby

# Create a standard 52 card deck
# Sort card suits according to Hearts, Diamonds, Clubs, then Spades.
# Sort cards in ascending order, from 2 to Ace.
def create_deck
# Your code goes here
end
card_deck = create_deck
puts card_deck[0] == "2h" # 2 of Hearts
puts card_deck[8] == "10h" # 10 of Hearts
puts card_deck[51] == "As" # Ace of Spades