Documentation
¶
Index ¶
- Constants
- type Dealer
- type DealerReport
- type Hand
- func (h *Hand) Blackjack() bool
- func (h *Hand) Busted() bool
- func (h *Hand) Draw(c *cards.Card) *cards.Card
- func (h *Hand) FirstTwoCardTotal() int
- func (h *Hand) GetCard(i int) *cards.Card
- func (h *Hand) Pair() bool
- func (h *Hand) PairOf(r string) bool
- func (h *Hand) Reset()
- func (h *Hand) Soft() bool
- func (h *Hand) Soft17() bool
- func (h *Hand) SplitPair() *cards.Card
- func (h *Hand) ToString() string
- func (h *Hand) Total() int
- type HandReport
- type PlayStrategy
- type Player
- func (p *Player) BustedOrBlackjack() bool
- func (p *Player) Draw(c *cards.Card) *cards.Card
- func (p *Player) GetReport() *PlayerReport
- func (p *Player) Payoff(blackjack bool, busted bool, total int)
- func (p *Player) PlaceBet(b int64)
- func (p *Player) Play(s *cards.Shoe, up *cards.Card)
- func (p *Player) PlaySplit(w *Wager, s *cards.Shoe, up *cards.Card)
- type PlayerReport
- type SimulationReport
- type Table
- type TableReport
- type Wager
- type WagerReport
Constants ¶
View Source
const MaxSplitHands = 3
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dealer ¶
type Dealer struct { Hand Hand DealerReport DealerReport TimesHitSoft17 int64 HitSoft17 bool }
func (*Dealer) GetReport ¶
func (d *Dealer) GetReport() *DealerReport
func (*Dealer) Statistics ¶
func (d *Dealer) Statistics()
type DealerReport ¶
type DealerReport struct { Hand HandReport TimesHitSoft17 int64 }
type Hand ¶
type Hand struct { Cards []cards.Card // Cards in the hand // contains filtered or unexported fields }
func (*Hand) FirstTwoCardTotal ¶
type HandReport ¶
type PlayStrategy ¶
type Player ¶
type Player struct { TableRules *database.DBRulesPayload PlayStrategy PlayStrategy Wager Wager Splits [MaxSplitHands]Wager PlayerReport PlayerReport // contains filtered or unexported fields }
func NewPlayer ¶
func NewPlayer(tr *database.DBRulesPayload, playStrategy *PlayStrategy, blackjackPays string) *Player
func (*Player) BustedOrBlackjack ¶
func (*Player) GetReport ¶
func (p *Player) GetReport() *PlayerReport
type PlayerReport ¶
type PlayerReport struct { Wager WagerReport Hand HandReport }
func NewPlayerReport ¶
func NewPlayerReport() *PlayerReport
type SimulationReport ¶
type Table ¶
type Table struct { Number int Dealer *Dealer Player *Player Shoe cards.Shoe TableRules *database.DBRulesPayload SimulationReport SimulationReport }
func (*Table) GetReport ¶
func (t *Table) GetReport() *SimulationReport
type TableReport ¶
type TableReport struct { NumberOfRounds int64 NumberOfHandsDealt int64 TableRules *database.DBRulesPayload BlackjackPays string Penetration float64 ShoeReport *cards.ShoeReport DealerReport *DealerReport PlayerReport *PlayerReport }
type Wager ¶
type Wager struct { Hand Hand // The hand associated with the wager AmountBet int64 // The amount of the initial bet AmountWon int64 // The amount won from the wager DoubleBet int64 // The amount of the double bet DoubleWon int64 // The amount won from the wager }
func (*Wager) SplitWager ¶
func (*Wager) WonBlackjack ¶
Click to show internal directories.
Click to hide internal directories.