package
Version:
v0.0.0-...-d1f5433
Opens a new window with list of versions in this module.
Published: Feb 1, 2023
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Card struct {
Suit int8
Number int8
}
type Deck struct {
Cards []Card
}
NewDeck create a new standard deck.
func (deck *Deck) AddDeck(amount int)
AddDeck return new ordered trump decks.
You can choose amount of deck.
func (deck *Deck) Clear()
Clear the deck
Draw Cards.
It returns drawed deck
func (deck *Deck) Remove(index int)
Remove Card deck.Cards[index]
func (deck *Deck) Shuffle()
Shuffle the deck
const (
Spade Suit = iota
Heart
Diamond
Clover
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.