Documentation ¶
Index ¶
- Variables
- func CardCombinations(deck Hand, k int) chan Hand
- func CardLessThan(card1, card2 Card) bool
- func Combinations(array []interface{}, k int) chan []interface{}
- func FlushLessThan(hand1, hand2 Hand5) bool
- func FourOfAKindLessThan(hand1, hand2 Hand5) bool
- func FullHouseLessThan(hand1, hand2 Hand5) bool
- func GetMatchesInHand(hand Hand, matchSizes map[int]int) map[int][]Hand
- func HandLessThan(hand1 Hand, hand2 Hand) bool
- func HighCardLessThan(hand1, hand2 Hand5) bool
- func IsFlush(hand Hand) (bool, []int)
- func IsFlush5(hand Hand5) (bool, int)
- func IsFourOfAKind(hand Hand) bool
- func IsFourOfAKind5(hand Hand5) bool
- func IsFullHouse(hand Hand) bool
- func IsFullHouse5(hand Hand5) bool
- func IsPair(hand Hand) bool
- func IsPair5(hand Hand5) bool
- func IsRoyalFlush(hand Hand) bool
- func IsRoyalFlush5(hand Hand5) bool
- func IsStraight(hand Hand) bool
- func IsStraight5(hand Hand5) bool
- func IsStraightFlush(hand Hand) bool
- func IsStraightFlush5(hand Hand5) bool
- func IsThreeOfAKind(hand Hand) bool
- func IsThreeOfAKind5(hand Hand5) bool
- func IsTwoPair(hand Hand) bool
- func IsTwoPair5(hand Hand5) bool
- func PairLessThan(hand1, hand2 Hand5) bool
- func RoyalFlushLessThan(hand1, hand2 Hand5) bool
- func StraightFlushLessThan(hand1, hand2 Hand5) bool
- func StraightLessThan(hand1, hand2 Hand5) bool
- func ThreeOfAKindLessThan(hand1, hand2 Hand5) bool
- func TwoPairLessThan(hand1, hand2 Hand5) bool
- type Card
- type Hand
- type Hand2
- type Hand5
- func BestHand(hand Hand) Hand5
- func GetFiveHighestCards(hand Hand) Hand5
- func GetFlush(hand Hand) Hand5
- func GetFourOfAKind(hand Hand) Hand5
- func GetFullHouse(hand Hand) Hand5
- func GetPair(hand Hand) Hand5
- func GetRoyalFlush(hand Hand) Hand5
- func GetStraight(hand Hand) Hand5
- func GetStraightFlush(hand Hand) Hand5
- func GetThreeOfAKind(hand Hand) Hand5
- func GetTwoPair(hand Hand) Hand5
- type Hand7
Constants ¶
This section is empty.
Variables ¶
View Source
var InvertedSuitMap = map[string]int{
"C": 1, "D": 2, "H": 3, "S": 4,
}
View Source
var InvertedValMap = map[string]int{
"A": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9, "10": 10, "J": 11, "Q": 12, "K": 13,
}
View Source
var SuitMap = map[int]string{
1: "C", 2: "D", 3: "H", 4: "S",
}
View Source
var ValMap = map[int]string{
1: "A", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10: "10", 11: "J", 12: "Q", 13: "K",
}
Functions ¶
func CardCombinations ¶
func Combinations ¶
func Combinations(array []interface{}, k int) chan []interface{}
func FlushLessThan ¶
func FourOfAKindLessThan ¶
func FullHouseLessThan ¶
func GetMatchesInHand ¶
// Orders the matches by number (ie 2, 3, 4) and then value of match
func HandLessThan ¶
func HighCardLessThan ¶
func IsFourOfAKind ¶
func IsFourOfAKind5 ¶
func IsFullHouse ¶
func IsFullHouse5 ¶
func IsRoyalFlush5 ¶
func IsStraight ¶
func IsStraight5 ¶
func IsStraightFlush ¶
func IsStraightFlush5 ¶
func IsThreeOfAKind ¶
func IsThreeOfAKind5 ¶
func IsTwoPair5 ¶
func PairLessThan ¶
func RoyalFlushLessThan ¶
func StraightFlushLessThan ¶
func StraightLessThan ¶
func ThreeOfAKindLessThan ¶
func TwoPairLessThan ¶
Types ¶
type Card ¶
func GetHighCard ¶
type Hand5 ¶
type Hand5 [5]Card
func GetFiveHighestCards ¶
func GetFourOfAKind ¶
func GetFullHouse ¶
func GetRoyalFlush ¶
func GetStraight ¶
func GetStraightFlush ¶
func GetThreeOfAKind ¶
func GetTwoPair ¶
Click to show internal directories.
Click to hide internal directories.