deck

package
v0.0.0-...-d63db7d Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encrypt

func Encrypt(key, payload []byte) ([]byte, error)

func EncryptCard

func EncryptCard(key []byte, card Card) ([]byte, error)

Types

type Card

type Card struct {
	Suit  Suit
	Value int
}

func DecryptCard

func DecryptCard(key, encCard []byte) (Card, error)

func NewCard

func NewCard(s Suit, v int) Card

func (Card) String

func (c Card) String() string

type Deck

type Deck [52]Card

func New

func New() Deck

type Suit

type Suit int
const (
	Spades   Suit = iota // 0
	Harts                // 1
	Diamonds             // 2
	Clubs                // 3
)

func (Suit) String

func (s Suit) String() string

Jump to

Keyboard shortcuts

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