Documentation

Index

Constants

View Source
const MinHand = 4

Variables

This section is empty.

Functions

func DrainInto

func DrainInto(src, dest *[]playing.Card)

Types

type Game

type Game struct {
	Phase
	Deck    []playing.Card
	CutCard *playing.Card
	Dealer  int
	Crib    []playing.Card
	Players []Player
}

func NewGame

func NewGame(players int) Game

func (Game) CardsDealtToCrib

func (g Game) CardsDealtToCrib() int

func (Game) CardsToDealPerPlayer

func (g Game) CardsToDealPerPlayer() int

func (*Game) CutAt

func (g *Game) CutAt(depth int)

func (*Game) DealCardTo

func (g *Game) DealCardTo(dest *[]playing.Card)

func (*Game) DealRound

func (g *Game) DealRound()

func (Game) Left

func (g Game) Left(player int) int

func (Game) NumPlayers

func (g Game) NumPlayers() int

func (*Game) Reset

func (g *Game) Reset()

func (Game) Right

func (g Game) Right(player int) int

func (*Game) Sacrifice

func (g *Game) Sacrifice(player, card int)

func (*Game) Shuffle

func (g *Game) Shuffle()

func (Game) String

func (g Game) String() string

type Phase

type Phase uint8
const (
	BetweenHands Phase = iota
	Dealing
	Sacrifice
	Cut
	CircularCount
	CountHands
	CountCrib
)

func (Phase) String

func (p Phase) String() string

type Player

type Player struct {
	Hand, Table []playing.Card
}

func (Player) String

func (p Player) String() string

Source Files

Directories

Path Synopsis