Documentation ¶
Index ¶
- Constants
- type Dealer
- type GameData
- func (gd *GameData) API() bjapi.BlackjackAPI
- func (gd *GameData) CurrentPlayer() Player
- func (gd *GameData) Discard(cards []decks.Card)
- func (gd *GameData) Draw() decks.Card
- func (gd *GameData) IsDealersTurn() bool
- func (gd *GameData) NewRound()
- func (gd *GameData) NextPlayersTurn()
- func (gd *GameData) Players() []Player
- func (gd *GameData) ShouldShuffle() bool
- func (gd *GameData) Shuffle()
- func (gd *GameData) SplitCurrentPlayer()
- type Player
Constants ¶
View Source
const (
HandSize = 2
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameData ¶
type GameData struct { Dealer // contains filtered or unexported fields }
func (*GameData) API ¶
func (gd *GameData) API() bjapi.BlackjackAPI
func (*GameData) CurrentPlayer ¶
func (*GameData) IsDealersTurn ¶
func (*GameData) NextPlayersTurn ¶
func (gd *GameData) NextPlayersTurn()
func (*GameData) ShouldShuffle ¶
func (*GameData) SplitCurrentPlayer ¶
func (gd *GameData) SplitCurrentPlayer()
type Player ¶
type Player interface { Name() string Hand() []decks.Card Discard() []decks.Card Split() (Player, Player) Unsplit(p2 Player) DoubleDown() Deal(c decks.Card) Bet(amount int) Payout(coef float64) LoseBet() Balance() int Score() int HasSoftScore() bool HasBlackjack() bool CanDoubleDown() bool CanSplit() bool IsSplit() bool IsBusted() bool }
Click to show internal directories.
Click to hide internal directories.