Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterCard ¶
FilterCard removes all copies of a specific card from the deck.
func FilterDeck ¶
FilterDeck removes all cards of a deck from the other.
Types ¶
type Card ¶
Card represents a playing card.
func CreateJoker ¶
func CreateJoker() Card
CreateJoker returns a joker Card. TODO: Value of 1 for joker might not make any difference unless it's assigned a numerical value later in the exercise.
type Deck ¶
type Deck struct {
Cards []Card
}
Deck represents a pack of cards.
func New ¶
New generates a deck of cards with options. Options are in form of functions with this signature "func(Deck) Deck" They are executed on the deck and each transforms the deck.
func NewDefault ¶
func NewDefault() Deck
NewDefault generates a new deck without jokers or any options.
Click to show internal directories.
Click to hide internal directories.