strategy

package
v0.0.0-...-83cae81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvoidCribFifteens

func AvoidCribFifteens(desired int, hand []model.Card) ([]model.Card, error)

AvoidCribFifteens tries to return a set of cards which does not add up to 15

func AvoidCribPairs

func AvoidCribPairs(desired int, hand []model.Card) ([]model.Card, error)

AvoidCribPairs tries to return a set of cards which does not make a pair (unequal value)

func GiveCribFifteens

func GiveCribFifteens(desired int, hand []model.Card) ([]model.Card, error)

GiveCribFifteens tries to return a set of cards which adds up to 15

func GiveCribHighestPotential

func GiveCribHighestPotential(_ int, hand []model.Card) ([]model.Card, error)

GiveCribHighestPotential gives the crib the highest potential pointed crib

func GiveCribLowestPotential

func GiveCribLowestPotential(_ int, hand []model.Card) ([]model.Card, error)

GiveCribLowestPotential gives the crib the lowest potential pointed hand

func GiveCribPairs

func GiveCribPairs(desired int, hand []model.Card) ([]model.Card, error)

GiveCribPairs tries to return a set of cards that makes a pair (equal value)

func KeepHandHighestPotential

func KeepHandHighestPotential(_ int, hand []model.Card) ([]model.Card, error)

KeepHandHighestPotential will keep the hand with the highest potential score

func KeepHandLowestPotential

func KeepHandLowestPotential(_ int, hand []model.Card) ([]model.Card, error)

KeepHandLowestPotential will keep the hand with the lowest potential score

func PegHighestCardNow

func PegHighestCardNow(hand []model.Card, prevPegs []model.PeggedCard, curPeg int) (model.Card, bool)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL