poker

package
v0.0.0-...-120cf50 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSamePointCardsIndex

func GetSamePointCardsIndex(cards ...PokerCard) map[byte][]PokerCard

获得点数相同牌集合(注意剔除牌数为1的item) 返回 key:point value:牌集合

func IsColorEqual

func IsColorEqual(cards ...PokerCard) bool

是否花色一样

func IsPointEqual

func IsPointEqual(cards ...PokerCard) bool

是否点数一样

Types

type CardHeap

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

func (*CardHeap) AddCard

func (ch *CardHeap) AddCard(cards ...PokerCard)

type CheckF

type CheckF func(cards ...PokerCard) bool

牌堆检查函数

type PokerCard

type PokerCard interface {
	Point() byte //点数
	Color() byte //花色
}

一张牌

func AscendingByPoint

func AscendingByPoint(cards ...PokerCard) []PokerCard

按点数从小到大排序

func DescendingByPoint

func DescendingByPoint(cards ...PokerCard) []PokerCard

按点数从大到小排序

func MaxPointCard

func MaxPointCard(cards ...PokerCard) PokerCard

获得点数最大的牌

func MinPointCard

func MinPointCard(cards ...PokerCard) PokerCard

获得点数最小的牌

Jump to

Keyboard shortcuts

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