Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotEnoughCards = errors.New("not enough cards")
ErrNotEnoughCards is the error returned when there are not enough cards in the deck.
Functions ¶
This section is empty.
Types ¶
type Deck ¶
type Deck struct {
// contains filtered or unexported fields
}
Deck represents a deck of cards.
func (*Deck) Composition ¶ added in v0.2.0
Composition returns the composition of the deck.
func (*Deck) IsShuffled ¶
IsShuffled returns true if the deck is shuffled.
type Option ¶
type Option func(d *Deck)
Option is a function that can be used to modify a deck.
func WithComposition ¶ added in v0.2.0
WithComposition returns an option that sets the composition of the deck.
func WithShuffled ¶
WithShuffled returns an option that sets the shuffled state of the deck.
Click to show internal directories.
Click to hide internal directories.