deck

package
v0.0.0-...-7d26021 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(deck Deck, card Card) bool

func Deal

func Deal(deck Deck, n int) (Deck, Deck)

Deal a specified amount of cards

func DealSingle

func DealSingle(deck Deck) (Deck, Card)

func Debug

func Debug(deck Deck)

Debug helps debugging the deck of cards

Types

type Card

type Card struct {
	Value int    `json:"value"`
	Stave string `json:"stave"`
}

Card holds the card staves and values in the deck

type Deck

type Deck []Card

Deck holds the cards in the deck

func New

func New() Deck

New creates a deck of cards to be used

func Remove

func Remove(deck Deck, card Card) Deck

Remove a specific card from the deck

func Shuffle

func Shuffle(deck Deck) Deck

Shuffle the deck

Jump to

Keyboard shortcuts

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