Documentation ¶
Index ¶
- func AvoidCribFifteens(desired int, hand []model.Card) ([]model.Card, error)
- func AvoidCribPairs(desired int, hand []model.Card) ([]model.Card, error)
- func GiveCribFifteens(desired int, hand []model.Card) ([]model.Card, error)
- func GiveCribHighestPotential(_ int, hand []model.Card) ([]model.Card, error)
- func GiveCribLowestPotential(_ int, hand []model.Card) ([]model.Card, error)
- func GiveCribPairs(desired int, hand []model.Card) ([]model.Card, error)
- func KeepHandHighestPotential(_ int, hand []model.Card) ([]model.Card, error)
- func KeepHandLowestPotential(_ int, hand []model.Card) ([]model.Card, error)
- func PegHighestCardNow(hand []model.Card, prevPegs []model.PeggedCard, curPeg int) (model.Card, bool)
- func PegToFifteen(hand []model.Card, prevPegs []model.PeggedCard, curPeg int) (_ model.Card, sayGo bool)
- func PegToPair(hand []model.Card, prevPegs []model.PeggedCard, curPeg int) (_ model.Card, sayGo bool)
- func PegToRun(hand []model.Card, prevPegs []model.PeggedCard, curPeg int) (_ model.Card, sayGo bool)
- func PegToThirtyOne(hand []model.Card, prevPegs []model.PeggedCard, curPeg int) (_ model.Card, sayGo bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvoidCribFifteens ¶
AvoidCribFifteens tries to return a set of cards which does not add up to 15
func AvoidCribPairs ¶
AvoidCribPairs tries to return a set of cards which does not make a pair (unequal value)
func GiveCribFifteens ¶
GiveCribFifteens tries to return a set of cards which adds up to 15
func GiveCribHighestPotential ¶
GiveCribHighestPotential gives the crib the highest potential pointed crib
func GiveCribLowestPotential ¶
GiveCribLowestPotential gives the crib the lowest potential pointed hand
func GiveCribPairs ¶
GiveCribPairs tries to return a set of cards that makes a pair (equal value)
func KeepHandHighestPotential ¶
KeepHandHighestPotential will keep the hand with the highest potential score
func KeepHandLowestPotential ¶
KeepHandLowestPotential will keep the hand with the lowest potential score
func PegHighestCardNow ¶
func PegToFifteen ¶
func PegToFifteen(hand []model.Card, prevPegs []model.PeggedCard, curPeg int) (_ model.Card, sayGo bool)
PegToFifteen returns a card that yields a fifteen if it can
func PegToPair ¶
func PegToPair(hand []model.Card, prevPegs []model.PeggedCard, curPeg int) (_ model.Card, sayGo bool)
PegToPair returns a card from the hand iff that card makes a pair and does not push the count over 31
func PegToRun ¶
func PegToRun(hand []model.Card, prevPegs []model.PeggedCard, curPeg int) (_ model.Card, sayGo bool)
PegToRun returns a card that forms the longest run if one is possible
func PegToThirtyOne ¶
func PegToThirtyOne(hand []model.Card, prevPegs []model.PeggedCard, curPeg int) (_ model.Card, sayGo bool)
PegToThirtyOne returns a card that yields 31 if it can
Types ¶
This section is empty.