fix(game): changed isEmpty of CardTile from protected to public

This commit is contained in:
Kieran Kihn
2025-11-16 19:54:18 +08:00
parent da0f2160ce
commit 49523a0384

View File

@@ -53,11 +53,6 @@ namespace UNO::GAME {
*/ */
[[nodiscard]] Card front() const; [[nodiscard]] Card front() const;
/**
* @return 牌堆是否为空
*/
[[nodiscard]] bool isEmpty() const;
/** /**
* 将牌堆中的卡牌随机洗混 * 将牌堆中的卡牌随机洗混
*/ */
@@ -70,12 +65,17 @@ namespace UNO::GAME {
public: public:
CardTile(); CardTile();
/**
* @return 牌堆是否为空
*/
[[nodiscard]] bool isEmpty() const;
}; };
/** /**
* @brief 弃牌堆 * @brief 弃牌堆
*/ */
class DiscardPile : CardTile { class DiscardPile : public CardTile {
public: public:
DiscardPile(); DiscardPile();
@@ -93,7 +93,7 @@ namespace UNO::GAME {
/** /**
* @brief 起牌堆 * @brief 起牌堆
*/ */
class Deck : CardTile { class Deck : public CardTile {
public: public:
Deck(); Deck();