cards

package module
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 1 Imported by: 0

README

cards

52 card deck

Documentation

Index

Constants

View Source
const (
	Heart int = iota
	Club
	Diamond
	Spade
)
View Source
const (
	Ace int = iota
	Two
	Three
	Four
	Five
	Six
	Seven
	Eight
	Nine
	Ten
	Jack
	Queen
	King
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card uint8

func (Card) Rank

func (c Card) Rank() int

func (Card) String

func (c Card) String() string

func (Card) Suit

func (c Card) Suit() int

type Deck

type Deck struct {
	// contains filtered or unexported fields
}

func NewDeck

func NewDeck() Deck

func (*Deck) IsExhausted

func (d *Deck) IsExhausted() bool

func (*Deck) Next

func (d *Deck) Next() (Card, bool)

func (*Deck) Shuffle

func (d *Deck) Shuffle(seed int64)

Jump to

Keyboard shortcuts

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