Documentation ¶
Index ¶
- func AllCombinations(cards []Card, k int) [][]Card
- func CompareVSMadeHand(p1 Player) error
- func Evaluate(cards []Card) (HandType, []Card, error)
- func EvaluateEquity(players []Player) ([]float64, error)
- func EvaluateEquityByMadeHand(players []Player) ([]float64, error)
- func EvaluateEquityByMadeHandWithCommunity(players []Player, community []Card) ([]float64, error)
- func GetPairs(cards []Card) [][]Card
- func IsStraight(cards []Card) *[]Card
- type Card
- type Deck
- type HandType
- type MadeHand
- type Player
- type Rank
- type Suit
- type Winner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllCombinations ¶
AllCombinations returns all combinations of k elements from the given slice.
func CompareVSMadeHand ¶
CompareVSMadeHand compares the hand of a player against all possible boards.
func EvaluateEquity ¶
EvaluateEquity returns the equity of each player in the game.
func EvaluateEquityByMadeHand ¶
EvaluateEquityByMadeHand returns the equity of each player in the game.
func IsStraight ¶
Types ¶
type Card ¶
func IsStraightFlush ¶
type HandType ¶
type HandType int
const ( HandTypeRoyalFlush HandType = 10 HandTypeStraightFlush HandType = 9 HandTypeFourOfAKind HandType = 8 HandTypeFullHouse HandType = 7 HandTypeFlush HandType = 6 HandTypeStraight HandType = 5 HandTypeThreeOfAKind HandType = 4 HandTypeTwoPair HandType = 3 HandTypePair HandType = 2 HandTypeHighCard HandType = 1 HandTypeUnknown HandType = 0 )
type MadeHand ¶
type MadeHand struct {
Value int
}
func NewBestMadeHand ¶
func NewMadeHandFromIndex ¶
type Player ¶
func CompareHands ¶
CompareHands returns the winner(s) of the game.
func CompareHandsByMadeHand ¶
CompareHandsByMadeHand returns the winner(s) of the game.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.