Documentation ¶
Index ¶
- Constants
- Variables
- type Card
- type Deck
- type Shoe
- func (s *Shoe) CardsDiscarded() int
- func (s *Shoe) CardsInplay() int
- func (s *Shoe) CardsUndealt() int
- func (s *Shoe) Discard(card *Card)
- func (s *Shoe) Draw() *Card
- func (s *Shoe) GetReport() *ShoeReport
- func (s *Shoe) ShouldShuffle() bool
- func (s *Shoe) Shuffle() (err error)
- func (s *Shoe) ShuffleDiscards() (err error)
- func (s *Shoe) ShuffleDiscardsFisherYates() (err error)
- type ShoeReport
Constants ¶
View Source
const ( Ace = "ace" Two = "two" Three = "three" Four = "four" Five = "five" Six = "six" Seven = "seven" Eight = "eight" Nine = "nine" Ten = "ten" Jack = "jack" Queen = "queen" King = "king" )
View Source
const ( Spades = "spades" Diamond = "diamond" Clubs = "clubs" Hearts = "hearts" )
Variables ¶
View Source
var Blackjack = map[string]int{
Two: 2,
Three: 3,
Four: 4,
Five: 5,
Six: 6,
Seven: 7,
Eight: 8,
Nine: 9,
Ten: 10,
Jack: 10,
Queen: 10,
King: 10,
Ace: 11,
}
Functions ¶
This section is empty.
Types ¶
type Card ¶
type Card struct { Suit string // Suit of the card (e.g., "hearts") Rank string // Rank of the card (e.g., "ace") Value int // Value of the card for game calculations Index int // Index of the card in a deck }
func (*Card) BlackjackAce ¶
func (*Card) BlackjackTen ¶
type Shoe ¶
type Shoe struct { ForceShuffle bool // Flag to force a shuffle ShoeReport ShoeReport // contains filtered or unexported fields }
func (*Shoe) CardsDiscarded ¶
func (*Shoe) CardsInplay ¶
func (*Shoe) CardsUndealt ¶
func (*Shoe) GetReport ¶
func (s *Shoe) GetReport() *ShoeReport
func (*Shoe) ShouldShuffle ¶
func (*Shoe) ShuffleDiscards ¶
func (*Shoe) ShuffleDiscardsFisherYates ¶
Click to show internal directories.
Click to hide internal directories.