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) 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) 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 int)
- func (p *Player) Play(s *cards.Shoe, up *cards.Card)
- func (p *Player) PlaySplit(h *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 HandReport ¶
type PlayStrategy ¶
type Player ¶
type Player struct { TableRules *database.TableRules PlayStrategy PlayStrategy Wager Wager Splits [MaxSplitHands]Wager PlayerReport PlayerReport // contains filtered or unexported fields }
func NewPlayer ¶
func NewPlayer(tr *database.TableRules, 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.TableRules SimulationReport SimulationReport }
func (*Table) GetReport ¶
func (t *Table) GetReport() *SimulationReport
type TableReport ¶
type TableReport struct { NumberOfRounds int64 NumberOfHandsDealt int64 TableRules *database.TableRules BlackjackPays string Penatration float64 ShoeReport *cards.ShoeReport DealerReport *DealerReport PlayerReport *PlayerReport }
type Wager ¶
type Wager struct { Hand Hand // The hand associated with the wager AmountBet int // The amount of the initial bet DoubleBet int // The amount of the double bet AmountWon int // The amount won from the wager }
func (*Wager) SplitWager ¶
func (*Wager) WonBlackjack ¶
type WagerReport ¶
Click to show internal directories.
Click to hide internal directories.