composition

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL