playingcard

package
v0.0.0-...-d1f5433 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 2 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 {
	Suit   int8
	Number int8
}

type Deck

type Deck struct {
	Cards []Card
}

func NewDeck

func NewDeck() *Deck

NewDeck create a new standard deck.

func (*Deck) AddDeck

func (deck *Deck) AddDeck(amount int)

AddDeck return new ordered trump decks. You can choose amount of deck.

func (*Deck) Clear

func (deck *Deck) Clear()

Clear the deck

func (*Deck) Draw

func (deck *Deck) Draw(count int) *Deck

Draw Cards. It returns drawed deck

func (*Deck) Remove

func (deck *Deck) Remove(index int)

Remove Card deck.Cards[index]

func (*Deck) Shuffle

func (deck *Deck) Shuffle()

Shuffle the deck

type Suit

type Suit int8
const (
	Spade Suit = iota
	Heart
	Diamond
	Clover
)

Jump to

Keyboard shortcuts

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