From 553c4362e3160e76bf0866092802fd2001e3118f Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Wed, 2 Aug 2023 15:52:40 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20poker=20=E5=8C=85=E8=BF=87=E6=97=B6?= =?UTF-8?q?=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/poker/card_pile.go | 2 ++ game/poker/doc.go | 2 ++ game/poker/rule.go | 1 + 3 files changed, 5 insertions(+) diff --git a/game/poker/card_pile.go b/game/poker/card_pile.go index 145cdd5..17d9c17 100644 --- a/game/poker/card_pile.go +++ b/game/poker/card_pile.go @@ -11,6 +11,8 @@ import ( // NewCardPile 返回一个新的牌堆,其中 size 表示了该牌堆由多少副牌组成 // - 在不洗牌的情况下,默认牌堆顶部到底部为从大到小排列 +// +// Deprecated: 从 Minotaur 0.0.25 开始,由于设计原因已弃用,请尝试考虑使用 deck.Deck 或 deck.Group 代替,构建函数为 deck.NewDeck 或 deck.NewGroup func NewCardPile[P, C generic.Number, T Card[P, C]](size int, jokers [2]P, points [13]P, colors [4]C, generateCard func(guid int64, point P, color C) T, options ...CardPileOption[P, C, T]) *CardPile[P, C, T] { pile := &CardPile[P, C, T]{ size: size, diff --git a/game/poker/doc.go b/game/poker/doc.go index 0f2b731..8d4621a 100644 --- a/game/poker/doc.go +++ b/game/poker/doc.go @@ -5,4 +5,6 @@ // - 扑克牌规则:该包提供了一系列函数,用于执行常见的扑克牌规则,如判断是否是同花顺、计算牌面点数等。这些函数旨在提供准确和可靠的规则判断和计算结果。 // - 扑克牌算法:"poker"包还提供了一些算法,用于解决扑克牌游戏中的问题,如计算最佳牌型、判断是否存在顺子等。这些算法旨在提供高效和优化的解决方案。 // - 简化接口:该包的设计目标之一是提供简化的接口,使扑克牌游戏的开发变得更加直观和易于使用。您可以轻松地创建和操作扑克牌对象,而无需处理繁琐的底层细节。 +// +// Deprecated: 从 Minotaur 0.0.25 开始,由于设计原因已弃用,请尝试考虑使用 utils/combination 和 utils/deck 代替 package poker diff --git a/game/poker/rule.go b/game/poker/rule.go index fde5495..ae0d024 100644 --- a/game/poker/rule.go +++ b/game/poker/rule.go @@ -7,6 +7,7 @@ import ( "sort" ) +// Deprecated: 从 Minotaur 0.0.25 开始,由于设计原因已弃用,请尝试考虑使用 combination.Combination、combination.Matcher、combination.Validator 代替 func NewRule[P, C generic.Number, T Card[P, C]](options ...Option[P, C, T]) *Rule[P, C, T] { poker := &Rule[P, C, T]{ pokerHand: map[string]HandHandle[P, C, T]{},