texas

package
v0.0.0-...-c9cf022 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PokeColor_FANG = 0
	PokeColor_MEI  = 1
	PokeColor_HONG = 2
	PokeColor_HEI  = 3
	PokeColor_GUI  = 5
)
View Source
const (
	PokeValue_2   = 2
	PokeValue_3   = 3
	PokeValue_4   = 4
	PokeValue_5   = 5
	PokeValue_6   = 6
	PokeValue_7   = 7
	PokeValue_8   = 8
	PokeValue_9   = 9
	PokeValue_10  = 10
	PokeValue_J   = 11
	PokeValue_Q   = 12
	PokeValue_K   = 13
	PokeValue_A   = 14
	PokeValue_GUI = 8
)
View Source
const (
	TEXAS_CARD_TYPE_GAOPAI          = 1  //高牌
	TEXAS_CARD_TYPE_DUIZI           = 2  //对子
	TEXAS_CARD_TYPE_LIANGDUI        = 3  //两对
	TEXAS_CARD_TYPE_SANTIAO         = 4  //三条
	TEXAS_CARD_TYPE_SHUNZI          = 5  //顺子
	TEXAS_CARD_TYPE_TONGHUA         = 6  //同花
	TEXAS_CARD_TYPE_HULU            = 7  //葫芦
	TEXAS_CARD_TYPE_SITIAO          = 8  //四条
	TEXAS_CARD_TYPE_TONGHUASHUN     = 9  //同花顺
	TEXAS_CARD_TYPE_KINGTONGHUASHUN = 10 //皇家同花顺
)
View Source
const (
	GUINUM = 2
	GENNUM = 52 + GUINUM
)

Variables

Functions

func BytesToStr

func BytesToStr(bytes []int8) string

func ChangeColor

func ChangeColor(k int64) int64

func Compare

func Compare(str1 string, str2 string) int

func CompareByBytes

func CompareByBytes(bytes1 []int8, bytes2 []int8) int

func CompareByKey

func CompareByKey(k1 int64, k2 int64) int

func GenCardBind

func GenCardBind(bytes []int8) int64

func GetExAllTypeProbability

func GetExAllTypeProbability(hand string, pub string) []float32

func GetExAllTypeProbabilityByBytes

func GetExAllTypeProbabilityByBytes(hand []int8, pub []int8) []float32

func GetExHandProbability

func GetExHandProbability(hand string, pub string) float32

func GetExTypeProbability

func GetExTypeProbability(hand string, pub string, t string) float32

func GetExTypeProbabilityByBytes

func GetExTypeProbabilityByBytes(hand []int8, pub []int8, t int) float32

func GetHandProbability

func GetHandProbability(hand string, pub string) float32

func GetMax

func GetMax(str string) (string, string)

func GetMaxBytes

func GetMaxBytes(bytes []int8) ([]int8, []int8)

func GetMaxBytesHandPub

func GetMaxBytesHandPub(hand []int8, pub []int8) ([]int8, []int8)

func GetWinName

func GetWinName(id int) string

func GetWinNameId

func GetWinNameId(n string) int

func GetWinProbability

func GetWinProbability(str string) float32

func GetWinProbabilityByBytes

func GetWinProbabilityByBytes(bytes []int8) float32

func GetWinProbabilityByKey

func GetWinProbabilityByKey(key int64) float32

func GetWinType

func GetWinType(str string) string

func GetWinTypeByBytes

func GetWinTypeByBytes(bytes []int8) int

func GetWinTypeId

func GetWinTypeId(str string) int

func IsGui

func IsGui(i int8) bool

func KeyToBytes

func KeyToBytes(k int64) []int8

func KeyToStr

func KeyToStr(key int64) string

func Load

func Load()

func LoadColor

func LoadColor(file string) error

func LoadLocal

func LoadLocal()

func LoadNormal

func LoadNormal(file string) error

func LoadNormalColor

func LoadNormalColor(local bool) error

func LoadProbility

func LoadProbility(local bool) error

func RemoveColor

func RemoveColor(k int64) int64

func StrToByte

func StrToByte(str string) int8

func StrToByteValue

func StrToByteValue(str string) int8

func StrToBytes

func StrToBytes(str string) []int8

Types

type KeyData

type KeyData struct {
	// contains filtered or unexported fields
}

func GetKeyData

func GetKeyData(bytes []int8) *KeyData

func GetKeyDataByKey

func GetKeyDataByKey(key int64) *KeyData

type Poke

type Poke struct {
	// contains filtered or unexported fields
}

func KeyToPoke

func KeyToPoke(k int64) []Poke

func NewPoke

func NewPoke(byteValue int8) Poke

func (*Poke) ToByte

func (p *Poke) ToByte() int8

func (*Poke) ToString

func (p *Poke) ToString() string

type ProbilityData

type ProbilityData struct {
	// contains filtered or unexported fields
}

func GetHandProbabilityData

func GetHandProbabilityData(k int64) *ProbilityData

Jump to

Keyboard shortcuts

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