fix(game): fixed unused var in CardTile::shuffle and add const for DiscardPile::getFront()

This commit is contained in:
Kieran Kihn
2025-11-16 20:52:40 +08:00
parent f06fee17cc
commit 7e996931ef
2 changed files with 2 additions and 4 deletions

View File

@@ -51,8 +51,6 @@ namespace UNO::GAME {
void CardTile::shuffle()
{
std::random_device rd;
std::mt19937 gen(rd());
std::ranges::shuffle(cards_, COMMON::Utils::getInstance()->getRandom().getGenerator());
}
@@ -68,7 +66,7 @@ namespace UNO::GAME {
this->pushFront(card);
}
Card DiscardPile::getFront()
Card DiscardPile::getFront() const
{
return this->front();
}

View File

@@ -87,7 +87,7 @@ namespace UNO::GAME {
/**
* @return 牌堆中最上方的牌
*/
Card getFront();
Card getFront() const;
};
/**