Documentation
¶
Index ¶
Constants ¶
View Source
const French = "french"
French is the French deck composition.
Variables ¶
View Source
var ( // ErrUnknownComposition is returned when a composition is not found. ErrUnknownComposition = errors.New("unknown composition") )
Functions ¶
This section is empty.
Types ¶
type Composition ¶
type Composition struct {
// contains filtered or unexported fields
}
Composition represents a collection of ranks and suits. (e.g french)
func FromString ¶
func FromString(s string) (*Composition, error)
FromString returns a card composition given a string.
func New ¶
func New(ranks card.Ranks, suits card.Suits) *Composition
New returns a new card composition given a collection of ranks and suits.
func (Composition) Ranks ¶
func (c Composition) Ranks() card.Ranks
Ranks returns a collection of ranks.
func (Composition) Suits ¶
func (c Composition) Suits() card.Suits
Suits returns a collection of suits.
Click to show internal directories.
Click to hide internal directories.