mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
fix(game): fixed unused var in CardTile::shuffle and add const for DiscardPile::getFront()
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace UNO::GAME {
|
||||
/**
|
||||
* @return 牌堆中最上方的牌
|
||||
*/
|
||||
Card getFront();
|
||||
Card getFront() const;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user