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
# A playing card. | |
class Card | |
# All possible suits a card can have | |
SUITS = %w(Clubs Diamonds Hearts Spades).freeze | |
# All possible ranks a card can have | |
RANKS = %w(2 3 4 5 6 7 8 9 10 Jack Queen King Ace).freeze | |
# Allows us to do `some_card.rank` and `some_card.suit` | |
attr_reader :rank, :suit |