Created
September 27, 2018 04:02
-
-
Save mjc-gh/3d299b86e18287151ced0087f871bcb0 to your computer and use it in GitHub Desktop.
Deck of 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
class Card < Struct.new(:rank, :suit) | |
def inspect | |
"#{rank} of #{suit}s" | |
end | |
end | |
## | |
# Problem #1 -- create a deck of cards and shuffle it | |
## | |
## | |
# Problem #2 -- sort the deck of cards by suit (Spades, Hearts, Diamonds, Clubs) then rank | |
## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment