Documentation ¶
Overview ¶
Package poker 提供了一组用于处理扑克牌游戏的函数和数据结构。该包旨在简化扑克牌游戏的开发过程,并提供一致的接口和易于使用的功能。
主要特性:
- 扑克牌操作:"poker"包支持处理扑克牌的各种操作,如洗牌、发牌、比较牌面大小等。您可以使用这些操作来模拟和实现各种扑克牌游戏。
- 扑克牌规则:该包提供了一系列函数,用于执行常见的扑克牌规则,如判断是否是同花顺、计算牌面点数等。这些函数旨在提供准确和可靠的规则判断和计算结果。
- 扑克牌算法:"poker"包还提供了一些算法,用于解决扑克牌游戏中的问题,如计算最佳牌型、判断是否存在顺子等。这些算法旨在提供高效和优化的解决方案。
- 简化接口:该包的设计目标之一是提供简化的接口,使扑克牌游戏的开发变得更加直观和易于使用。您可以轻松地创建和操作扑克牌对象,而无需处理繁琐的底层细节。
Index ¶
- Constants
- func GroupByColor(cards ...Card) map[Color][]Card
- func GroupByPoint(cards ...Card) map[Point][]Card
- func IsContainJoker(cards ...Card) bool
- func IsFlush(cards ...Card) bool
- func IsRocket(cardA, cardB Card) bool
- type Card
- func (slf Card) CalcColorDifference(card Card) int
- func (slf Card) CalcColorDifferenceAbs(card Card) int
- func (slf Card) CalcPointDifference(card Card) int
- func (slf Card) CalcPointDifferenceAbs(card Card) int
- func (slf Card) Equal(card Card) bool
- func (slf Card) EqualColor(card Card) bool
- func (slf Card) EqualPoint(card Card) bool
- func (slf Card) GetColor() Color
- func (slf Card) GetPoint() Point
- func (slf Card) GetPointAndColor() (Point, Color)
- func (slf Card) IsJoker() bool
- func (slf Card) IsNeighborColor(card Card) bool
- func (slf Card) IsNeighborPoint(card Card) bool
- func (slf Card) Max(card Card) Card
- func (slf Card) MaxColor(card Card) Card
- func (slf Card) MaxPoint(card Card) Card
- func (slf Card) Min(card Card) Card
- func (slf Card) MinColor(card Card) Card
- func (slf Card) MinPoint(card Card) Card
- func (slf Card) String() string
- type CardPile
- func (slf *CardPile) Cards() []Card
- func (slf *CardPile) Count() int
- func (slf *CardPile) IsExclude(point Point, color Color) bool
- func (slf *CardPile) IsExcludeWithCard(card Card) bool
- func (slf *CardPile) IsFree() bool
- func (slf *CardPile) Pull(index int) Card
- func (slf *CardPile) PullBottom() Card
- func (slf *CardPile) PullTop() Card
- func (slf *CardPile) Push(index int, card Card)
- func (slf *CardPile) PushBottom(card Card)
- func (slf *CardPile) PushTop(card Card)
- func (slf *CardPile) Reset()
- func (slf *CardPile) Shuffle()
- type CardPileOption
- type Color
- type HandHandle
- func HandBomb() HandHandle
- func HandFlush() HandHandle
- func HandFlushStraight(count, lower, limit int) HandHandle
- func HandFourWithOne() HandHandle
- func HandFourWithThree() HandHandle
- func HandFourWithTwo() HandHandle
- func HandFourWithTwoPairs() HandHandle
- func HandLeopard() HandHandle
- func HandOrderFourWithOne(count int) HandHandle
- func HandOrderFourWithThree(count int) HandHandle
- func HandOrderFourWithTwo(count int) HandHandle
- func HandOrderPairs(count int) HandHandle
- func HandOrderSingle(count int) HandHandle
- func HandOrderSingleFour(count int) HandHandle
- func HandOrderSingleThree(count int) HandHandle
- func HandOrderThreeWithOne(count int) HandHandle
- func HandOrderThreeWithTwo(count int) HandHandle
- func HandPairs() HandHandle
- func HandPlane() HandHandle
- func HandPlaneWithOne() HandHandle
- func HandRocket() HandHandle
- func HandSingle() HandHandle
- func HandStraightPairs() HandHandle
- func HandThreeOfKind() HandHandle
- func HandThreeOfKindWithOne() HandHandle
- func HandThreeOfKindWithTwo() HandHandle
- func HandTwoWithOne() HandHandle
- type Option
- func WithColorSort(colorSort map[Color]int) Option
- func WithColorValue(colorValues map[Color]int) Option
- func WithExcludeContinuityPoint(points ...Point) Option
- func WithHand(pokerHand string, value int, handle HandHandle) Option
- func WithHandRestraint(pokerHand, restraint string) Option
- func WithHandRestraintFull(pokerHand string) Option
- func WithPointSort(pointSort map[Point]int) Option
- func WithPointValue(pointValues map[Point]int) Option
- type Point
- type Rule
- func (slf *Rule) CompareValueWithCards(cards1 []Card, expression maths.CompareExpression, cards2 []Card) bool
- func (slf *Rule) GetCardCount(cards []Card, card Card) int
- func (slf *Rule) GetCardCountWithColor(cards []Card, color Color) int
- func (slf *Rule) GetCardCountWithColorMaximumNumber(cards []Card, color Color, maximumNumber int) int
- func (slf *Rule) GetCardCountWithMaximumNumber(cards []Card, card Card, maximumNumber int) int
- func (slf *Rule) GetCardCountWithPoint(cards []Card, point Point) int
- func (slf *Rule) GetCardCountWithPointMaximumNumber(cards []Card, point Point, maximumNumber int) int
- func (slf *Rule) GetValueWithCards(cards ...Card) int
- func (slf *Rule) GetValueWithColor(color Color) int
- func (slf *Rule) GetValueWithPoint(point Point) int
- func (slf *Rule) GetValueWithPokerHand(hand string, cards ...Card) int
- func (slf *Rule) IsPointContinuity(count int, cards ...Card) bool
- func (slf *Rule) IsSameColor(cards ...Card) bool
- func (slf *Rule) IsSamePoint(cards ...Card) bool
- func (slf *Rule) PokerHand(cards ...Card) (pokerHand string, hit bool)
- func (slf *Rule) PokerHandIsMatch(cardsA, cardsB []Card) bool
- func (slf *Rule) SortByColorAsc(cards []Card) []Card
- func (slf *Rule) SortByColorDesc(cards []Card) []Card
- func (slf *Rule) SortByPointAsc(cards []Card) []Card
- func (slf *Rule) SortByPointDesc(cards []Card) []Card
Examples ¶
- Card.CalcColorDifference
- Card.CalcColorDifferenceAbs
- Card.CalcPointDifference
- Card.CalcPointDifferenceAbs
- Card.Equal
- Card.EqualColor
- Card.EqualPoint
- Card.GetColor
- Card.GetPoint
- Card.GetPointAndColor
- Card.IsJoker
- Card.IsNeighborColor
- Card.IsNeighborPoint
- Card.Max
- Card.MaxColor
- Card.MaxPoint
- Card.Min
- Card.MinColor
- Card.MinPoint
- Card.String
- NewCard
- NewCardPile
Constants ¶
const (
HandNone = "None" // 无牌型
)
Variables ¶
This section is empty.
Functions ¶
func GroupByColor ¶ added in v0.0.3
GroupByColor 将扑克牌按照花色分组
func GroupByPoint ¶ added in v0.0.3
GroupByPoint 将扑克牌按照点数分组
func IsContainJoker ¶ added in v0.0.3
IsContainJoker 检查扑克牌是否包含大小王
Types ¶
type Card ¶
type Card struct {
// contains filtered or unexported fields
}
Card 扑克牌
func NewCard ¶
NewCard 创建一张扑克牌
- 当 point 为 PointBlackJoker 或 PointRedJoker 时,color 将没有效果
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card := poker.NewCard(poker.PointA, poker.ColorSpade) fmt.Println(card) }
Output: (A Spade)
func (Card) CalcColorDifference ¶ added in v0.0.3
CalcColorDifference 计算两张扑克牌的花色差
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.PointA, poker.ColorHeart) fmt.Println(card1.CalcColorDifference(card2)) }
Output: 1
func (Card) CalcColorDifferenceAbs ¶ added in v0.0.3
CalcColorDifferenceAbs 计算两张扑克牌的花色差的绝对值
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.PointA, poker.ColorHeart) fmt.Println(card1.CalcColorDifferenceAbs(card2)) }
Output: 1
func (Card) CalcPointDifference ¶ added in v0.0.3
CalcPointDifference 计算两张扑克牌的点数差
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.Point2, poker.ColorSpade) fmt.Println(card1.CalcPointDifference(card2)) }
Output: -1
func (Card) CalcPointDifferenceAbs ¶ added in v0.0.3
CalcPointDifferenceAbs 计算两张扑克牌的点数差的绝对值
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.Point2, poker.ColorSpade) fmt.Println(card1.CalcPointDifferenceAbs(card2)) }
Output: 1
func (Card) Equal ¶
Equal 比较与另一张扑克牌的点数和花色是否相同
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.PointA, poker.ColorSpade) fmt.Println(card1.Equal(card2)) }
Output: true
func (Card) EqualColor ¶
EqualColor 比较与另一张扑克牌的花色是否相同
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.PointA, poker.ColorHeart) fmt.Println(card1.EqualColor(card2)) }
Output: false
func (Card) EqualPoint ¶
EqualPoint 比较与另一张扑克牌的点数是否相同
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.PointA, poker.ColorHeart) fmt.Println(card1.EqualPoint(card2)) }
Output: true
func (Card) GetColor ¶
GetColor 返回扑克牌的花色
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card := poker.NewCard(poker.PointA, poker.ColorSpade) fmt.Println(card.GetColor()) }
Output: Spade
func (Card) GetPoint ¶
GetPoint 返回扑克牌的点数
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card := poker.NewCard(poker.PointA, poker.ColorSpade) fmt.Println(card.GetPoint()) }
Output: A
func (Card) GetPointAndColor ¶
GetPointAndColor 返回扑克牌的点数和花色
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card := poker.NewCard(poker.PointA, poker.ColorSpade) fmt.Println(card.GetPointAndColor()) }
Output: A Spade
func (Card) IsJoker ¶ added in v0.0.3
IsJoker 判断是否为大小王
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card := poker.NewCard(poker.PointA, poker.ColorSpade) fmt.Println(card.IsJoker()) }
Output: false
func (Card) IsNeighborColor ¶ added in v0.0.3
IsNeighborColor 判断两张扑克牌是否为相邻的花色
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.PointA, poker.ColorHeart) fmt.Println(card1.IsNeighborColor(card2)) }
Output: true
func (Card) IsNeighborPoint ¶ added in v0.0.3
IsNeighborPoint 判断两张扑克牌是否为相邻的点数
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.Point2, poker.ColorSpade) fmt.Println(card1.IsNeighborPoint(card2)) }
Output: true
func (Card) Max ¶ added in v0.0.3
Max 返回两张扑克牌中点数和花色较大的一张
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.PointA, poker.ColorHeart) fmt.Println(card1.Max(card2)) }
Output: (A Spade)
func (Card) MaxColor ¶ added in v0.0.3
MaxColor 返回两张扑克牌中花色较大的一张
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.PointA, poker.ColorHeart) fmt.Println(card1.MaxColor(card2)) }
Output: (A Spade)
func (Card) MaxPoint ¶ added in v0.0.3
MaxPoint 返回两张扑克牌中点数较大的一张
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.Point2, poker.ColorSpade) fmt.Println(card1.MaxPoint(card2)) }
Output: (2 Spade)
func (Card) Min ¶ added in v0.0.3
Min 返回两张扑克牌中点数和花色较小的一张
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.PointA, poker.ColorHeart) fmt.Println(card1.Min(card2)) }
Output: (A Heart)
func (Card) MinColor ¶ added in v0.0.3
MinColor 返回两张扑克牌中花色较小的一张
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.PointA, poker.ColorHeart) fmt.Println(card1.MinColor(card2)) }
Output: (A Heart)
func (Card) MinPoint ¶ added in v0.0.3
MinPoint 返回两张扑克牌中点数较小的一张
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { card1 := poker.NewCard(poker.PointA, poker.ColorSpade) card2 := poker.NewCard(poker.Point2, poker.ColorSpade) fmt.Println(card1.MinPoint(card2)) }
Output: (A Spade)
type CardPile ¶
type CardPile struct {
// contains filtered or unexported fields
}
CardPile 扑克牌堆
func NewCardPile ¶
func NewCardPile(size int, options ...CardPileOption) *CardPile
NewCardPile 返回一个新的牌堆,其中 size 表示了该牌堆由多少副牌组成
- 在不洗牌的情况下,默认牌堆顶部到底部为从大到小排列
Example ¶
package main import ( "fmt" "github.com/kercylan98/minotaur/game/poker" ) func main() { var pile = poker.NewCardPile(1, poker.WithCardPileExcludeCard(poker.NewCard(poker.PointBlackJoker, poker.ColorNone)), ) fmt.Println(pile.Cards()) }
Output: [(R None) (K Diamond) (K Club) (K Heart) (K Spade) (Q Diamond) (Q Club) (Q Heart) (Q Spade) (J Diamond) (J Club) (J Heart) (J Spade) (10 Diamond) (10 Club) (10 Heart) (10 Spade) (9 Diamond) (9 Club) (9 Heart) (9 Spade) (8 Diamond) (8 Club) (8 Heart) (8 Spade) (7 Diamond) (7 Club) (7 Heart) (7 Spade) (6 Diamond) (6 Club) (6 Heart) (6 Spade) (5 Diamond) (5 Club) (5 Heart) (5 Spade) (4 Diamond) (4 Club) (4 Heart) (4 Spade) (3 Diamond) (3 Club) (3 Heart) (3 Spade) (2 Diamond) (2 Club) (2 Heart) (2 Spade) (A Diamond) (A Club) (A Heart) (A Spade)]
func (*CardPile) IsExcludeWithCard ¶
IsExcludeWithCard 检查特定扑克牌是否被排除在外
type CardPileOption ¶
type CardPileOption func(pile *CardPile)
func WithCardPileExcludeCard ¶
func WithCardPileExcludeCard(cards ...Card) CardPileOption
WithCardPileExcludeCard 通过排除特定扑克牌的方式创建牌堆
func WithCardPileExcludeColor ¶
func WithCardPileExcludeColor(colors ...Color) CardPileOption
WithCardPileExcludeColor 通过排除特定花色的方式创建牌堆
func WithCardPileExcludePoint ¶
func WithCardPileExcludePoint(points ...Point) CardPileOption
WithCardPileExcludePoint 通过排除特定点数的方式创建牌堆
func WithCardPileShuffle ¶
func WithCardPileShuffle(shuffleHandle func(pile []Card) []Card) CardPileOption
WithCardPileShuffle 通过特定的洗牌算法创建牌堆
- 需要保证洗牌后的牌堆剩余扑克数量与之前相同,否则将会引发 panic
type HandHandle ¶
HandHandle 扑克牌型验证函数
func HandFlushStraight ¶ added in v0.0.3
func HandFlushStraight(count, lower, limit int) HandHandle
HandFlushStraight 同花顺
- count: 顺子的对子数量,例如当 count = 2 时,可以是 334455、445566、556677、667788、778899
- lower: 顺子的最小连续数量
- limit: 顺子的最大连续数量
func HandFourWithTwoPairs ¶ added in v0.0.3
func HandFourWithTwoPairs() HandHandle
HandFourWithTwoPairs 四带两对
func HandLeopard ¶ added in v0.0.3
func HandLeopard() HandHandle
HandLeopard 豹子
- 表示三张点数相同的牌
- 例如:333、444、555、666、777、888、999、JJJ、QQQ、KKK、AAA
- 大小王不能用于豹子,因为他们没有点数
func HandOrderFourWithOne ¶ added in v0.0.3
func HandOrderFourWithOne(count int) HandHandle
HandOrderFourWithOne 四带一顺子
func HandOrderFourWithThree ¶ added in v0.0.3
func HandOrderFourWithThree(count int) HandHandle
HandOrderFourWithThree 四带三顺子
func HandOrderFourWithTwo ¶ added in v0.0.3
func HandOrderFourWithTwo(count int) HandHandle
HandOrderFourWithTwo 四带二顺子
func HandOrderSingle ¶ added in v0.0.3
func HandOrderSingle(count int) HandHandle
HandOrderSingle 顺子
func HandOrderSingleFour ¶ added in v0.0.3
func HandOrderSingleFour(count int) HandHandle
HandOrderSingleFour 四张顺子
func HandOrderSingleThree ¶ added in v0.0.3
func HandOrderSingleThree(count int) HandHandle
HandOrderSingleThree 三张顺子
func HandOrderThreeWithOne ¶ added in v0.0.3
func HandOrderThreeWithOne(count int) HandHandle
HandOrderThreeWithOne 三带一顺子
func HandOrderThreeWithTwo ¶ added in v0.0.3
func HandOrderThreeWithTwo(count int) HandHandle
HandOrderThreeWithTwo 三带二顺子
func HandThreeOfKindWithOne ¶ added in v0.0.3
func HandThreeOfKindWithOne() HandHandle
HandThreeOfKindWithOne 三带一
func HandThreeOfKindWithTwo ¶ added in v0.0.3
func HandThreeOfKindWithTwo() HandHandle
HandThreeOfKindWithTwo 三带二
func HandTwoWithOne ¶ added in v0.0.3
func HandTwoWithOne() HandHandle
HandTwoWithOne 二带一
- 表示两张点数相同的牌,加上一张其他点数的牌
- 例如:334、445、556、667、778、889、99J、TTQ、JJK、QQA、AA2
- 大小王不能用于二带一,因为他们没有点数
- 通常用于炸金花玩法中检查对子
type Option ¶
type Option func(rule *Rule)
func WithColorSort ¶ added in v0.0.3
WithColorSort 通过特定的扑克花色顺序创建扑克玩法,顺序必须为连续的
func WithColorValue ¶
WithColorValue 通过特定的扑克花色牌值创建扑克玩法
func WithExcludeContinuityPoint ¶ added in v0.0.3
WithExcludeContinuityPoint 排除连续的点数
func WithHand ¶
func WithHand(pokerHand string, value int, handle HandHandle) Option
WithHand 通过绑定特定牌型的方式创建扑克玩法
- 牌型顺序决定了牌型的优先级
func WithHandRestraint ¶ added in v0.0.3
WithHandRestraint 通过绑定特定克制牌型的方式创建扑克玩法
func WithHandRestraintFull ¶ added in v0.0.3
WithHandRestraintFull 通过绑定所有克制牌型的方式创建扑克玩法
- 需要确保在牌型声明之后调用
func WithPointSort ¶
WithPointSort 通过特定的扑克点数顺序创建扑克玩法,顺序必须为连续的
func WithPointValue ¶
WithPointValue 通过特定的扑克点数牌值创建扑克玩法
type Rule ¶ added in v0.0.3
type Rule struct {
// contains filtered or unexported fields
}
func (*Rule) CompareValueWithCards ¶ added in v0.0.3
func (slf *Rule) CompareValueWithCards(cards1 []Card, expression maths.CompareExpression, cards2 []Card) bool
CompareValueWithCards 根据特定的条件表达式比较两组扑克牌的牌值
func (*Rule) GetCardCount ¶ added in v0.0.4
GetCardCount 获取指定牌的数量
func (*Rule) GetCardCountWithColor ¶ added in v0.0.4
GetCardCountWithColor 获取指定花色的牌的数量
func (*Rule) GetCardCountWithColorMaximumNumber ¶ added in v0.0.4
func (slf *Rule) GetCardCountWithColorMaximumNumber(cards []Card, color Color, maximumNumber int) int
GetCardCountWithColorMaximumNumber 获取指定花色的牌的数量
func (*Rule) GetCardCountWithMaximumNumber ¶ added in v0.0.4
GetCardCountWithMaximumNumber 获取指定牌的数量
func (*Rule) GetCardCountWithPoint ¶ added in v0.0.4
GetCardCountWithPoint 获取指定点数的牌的数量
func (*Rule) GetCardCountWithPointMaximumNumber ¶ added in v0.0.4
func (slf *Rule) GetCardCountWithPointMaximumNumber(cards []Card, point Point, maximumNumber int) int
GetCardCountWithPointMaximumNumber 获取指定点数的牌的数量
func (*Rule) GetValueWithCards ¶ added in v0.0.3
GetValueWithCards 获取扑克牌的牌值
func (*Rule) GetValueWithColor ¶ added in v0.0.3
GetValueWithColor 获取扑克牌的花色牌值
func (*Rule) GetValueWithPoint ¶ added in v0.0.3
GetValueWithPoint 获取扑克牌的点数牌值
func (*Rule) GetValueWithPokerHand ¶ added in v0.0.3
GetValueWithPokerHand 获取扑克牌的牌型牌值
func (*Rule) IsPointContinuity ¶ added in v0.0.3
IsPointContinuity 检查一组扑克牌点数是否连续,count 表示了每个点数的数量
func (*Rule) IsSameColor ¶ added in v0.0.3
IsSameColor 检查一组扑克牌是否同花
func (*Rule) IsSamePoint ¶ added in v0.0.3
IsSamePoint 检查一组扑克牌是否同点
func (*Rule) PokerHandIsMatch ¶ added in v0.0.3
PokerHandIsMatch 检查两组扑克牌牌型是否匹配
func (*Rule) SortByColorAsc ¶ added in v0.0.3
SortByColorAsc 将扑克牌按照花色从小到大排序
func (*Rule) SortByColorDesc ¶ added in v0.0.3
SortByColorDesc 将扑克牌按照花色从大到小排序
func (*Rule) SortByPointAsc ¶ added in v0.0.3
SortByPointAsc 将扑克牌按照点数从小到大排序
func (*Rule) SortByPointDesc ¶ added in v0.0.3
SortByPointDesc 将扑克牌按照点数从大到小排序