deck

package
v0.0.0-...-3040c09 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Value string
	Suit  Suit
	Code  string
}

func ConvertCardCodeIntoCard

func ConvertCardCodeIntoCard(code string) (*Card, error)

func ConvertCards

func ConvertCards(cards []string) ([]*Card, error)

func GenerateCards

func GenerateCards() []*Card

func ShuffleCards

func ShuffleCards(cards []*Card) []*Card

type Deck

type Deck struct {
	ID        uuid.UUID
	Shuffled  bool
	Remaining int
	Cards     []*Card
}

type Suit

type Suit string
const (
	Clubs    Suit = "CLUBS"
	Diamonds Suit = "DIAMONDS"
	Hearts   Suit = "HEARTS"
	Spades   Suit = "SPADES"
)

Jump to

Keyboard shortcuts

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