Documentation ¶
Overview ¶
功能:组合 说明:
功能: 说明:
功能:查找 说明:
功能:随机 说明:
功能:删除 说明:
功能:排序 说明:
Index ¶
- func Combo_card_type(hole_cards []byte, target_hole_cnt int, board_cards []byte, ...) []common.CardCtrl
- func Combo_cards(all_cards []byte, target_cnt int) []common.CardCtrl
- func Combo_cnt(n int, k int) int64
- func Factorial(n int) *big.Int
- func Find_cnt[T byte | int](all []T, element T) int
- func Find_suit_cnt(cards []byte, suit byte, Suit SuitFunc) int
- func Find_value_cnt(cards []byte, value byte, Value ValueFunc) int
- func Permutation_cnt(n int, k int) int64
- func Raw_cards(decks int) []byte
- func Remove[T byte | int](all []T, target_element T) (removed_cnt int, results []T)
- func Remove_duplication[T byte | int](all []T) []T
- func Remove_value(all []byte, target_value byte, Value ValueFunc) (removed_cnt int, result_cards []byte)
- func Remove_values(all []byte, target_values []byte, Value ValueFunc) (removed_cnt int, result_cards []byte)
- func Removes[T byte | int](all []T, target_elements []T) (removed_cnt int, results []T)
- func Shuffle_cards(decks int) []byte
- func Shuffle_cards_ex(cards []byte) []byte
- func Sort_by_suit(cards []byte, Suit SuitFunc, Value ValueFunc, order_types ...ORDER_TYPE.TYPE) []byte
- func Sort_by_suit_cnt(cards []byte, Suit SuitFunc, Value ValueFunc, order_types ...ORDER_TYPE.TYPE) []byte
- func Sort_by_value(cards []byte, Suit SuitFunc, Value ValueFunc, order_types ...ORDER_TYPE.TYPE) []byte
- func Sort_by_value_cnt(cards []byte, Suit SuitFunc, Value ValueFunc, order_types ...ORDER_TYPE.TYPE) []byte
- type SuitFunc
- type ValueFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Combo_card_type ¶
func Combo_card_type(hole_cards []byte, target_hole_cnt int, board_cards []byte, target_board_cnt int) []common.CardCtrl
Combo_card_type 按所需张数进行组合,返回组合牌型的列表 hole_cards:手里的牌 target_hole_cnt:需要手里的牌的张数 board_cards:公共牌 target_board_cnt:需要公共牌的张数
func Combo_cards ¶
Combo_cards 组合牌
func Find_suit_cnt ¶
Find_suit_cnt 查找花色个数
func Find_value_cnt ¶
Find_value_cnt 查找牌值个数
func Permutation_cnt ¶
Permutation_cnt 排列数,数学方法计算排列数(从n中取k个数),排列有顺序 P(n,k) = n!/(n-k)!
func Remove_value ¶
func Remove_value(all []byte, target_value byte, Value ValueFunc) (removed_cnt int, result_cards []byte)
删除牌值
func Remove_values ¶
func Shuffle_cards_ex ¶
func Sort_by_suit ¶
func Sort_by_suit(cards []byte, Suit SuitFunc, Value ValueFunc, order_types ...ORDER_TYPE.TYPE) []byte
Sort_by_suit 按花色排序,默认升序
func Sort_by_suit_cnt ¶
func Sort_by_suit_cnt(cards []byte, Suit SuitFunc, Value ValueFunc, order_types ...ORDER_TYPE.TYPE) []byte
Sort_by_suit_cnt 按花色个数排序,默认升序
func Sort_by_value ¶
func Sort_by_value(cards []byte, Suit SuitFunc, Value ValueFunc, order_types ...ORDER_TYPE.TYPE) []byte
Sort_by_value 按值大小排序,默认升序
func Sort_by_value_cnt ¶
func Sort_by_value_cnt(cards []byte, Suit SuitFunc, Value ValueFunc, order_types ...ORDER_TYPE.TYPE) []byte
Sort_by_value_cnt 按值个数排序,默认升序
Types ¶
Click to show internal directories.
Click to hide internal directories.