Documentation ¶
Overview ¶
all rights reserved
: Rick Badertscher (rick.badertscher@gmail.com)
Index ¶
- Constants
- func CalculateOdds(deck *Deck, hands Hands, commonCards []Card, depth int) map[int]*Odds
- func DoRank(cards []Card, checkedSets map[HandRank][]Card) ([]Card, HandRank)
- func PrintHand(cards []Card) string
- func Rank(cards []Card) ([]Card, HandRank)
- func SortCards(cards []Card)
- func SortCardsByIndex(cards []Card)
- type ByCardIndex
- type ByCount
- type ByValue
- type Card
- type CardAbsoluteValue
- type CardCode
- type CardSet
- type Deck
- type HandKind
- type HandRank
- type Hands
- type Histogram
- type Index
- type Odds
- type Suit
Constants ¶
View Source
const CARD_MASK = 0x0000000F
View Source
const HAND_KIND_MASK = 0xFFF00000
View Source
const HAND_KIND_SHIFT = 20
Variables ¶
This section is empty.
Functions ¶
func CalculateOdds ¶
*
Computes win & ties odds given a set of hand cards and a set of common cards @samples is the number of sample hands evaulated to compute the odds estimate
func SortCardsByIndex ¶
func SortCardsByIndex(cards []Card)
Types ¶
type ByCardIndex ¶
type ByCardIndex []Card
func (ByCardIndex) Len ¶
func (a ByCardIndex) Len() int
func (ByCardIndex) Less ¶
func (a ByCardIndex) Less(i, j int) bool
func (ByCardIndex) Swap ¶
func (a ByCardIndex) Swap(i, j int)
type Card ¶
func CardAbsoluteValueToCard ¶ added in v0.0.40
func CardAbsoluteValueToCard(v CardAbsoluteValue) Card
func (Card) GetAbsoluteValue ¶ added in v0.0.40
func (this Card) GetAbsoluteValue() CardAbsoluteValue
func (Card) GetCardCode ¶ added in v0.0.40
func (Card) GetIndexValue ¶
type CardAbsoluteValue ¶ added in v0.0.40
type CardAbsoluteValue uint16
func CardToCardAbsoluteValue ¶ added in v0.0.40
func CardToCardAbsoluteValue(c Card) CardAbsoluteValue
type CardSet ¶
type CardSet []Card
CardSet is a consistantly sorted set of cards
func NewCardSet ¶
func (CardSet) ContainsCard ¶
type Deck ¶
type Deck struct {
// contains filtered or unexported fields
}
func (*Deck) BorrowRandom ¶
func (*Deck) ReturnCard ¶
type HandRank ¶
type HandRank uint
func (HandRank) DescribeBasic ¶
func (HandRank) DescribeWithColor ¶
Click to show internal directories.
Click to hide internal directories.