mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
fix(game): add setIsUno for PlayerState
This commit is contained in:
@@ -36,6 +36,11 @@ namespace UNO::GAME {
|
||||
this->remainingCardCount_ = x;
|
||||
}
|
||||
|
||||
void PlayerState::setIsUno(bool x)
|
||||
{
|
||||
this->isUno_ = x;
|
||||
}
|
||||
|
||||
ServerPlayerState::ServerPlayerState(std::string name, size_t remainingCardCount, bool isUno, HandCard *handCard) :
|
||||
PlayerState(std::move(name), remainingCardCount, isUno), handCard_(handCard)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,17 @@ namespace UNO::GAME {
|
||||
*/
|
||||
[[nodiscard]] size_t getRemainingCardCount() const;
|
||||
|
||||
/**
|
||||
* 将剩余手牌设置为 x 张
|
||||
* @param x 要设置的张数
|
||||
*/
|
||||
void setRemainingCardCount(size_t x);
|
||||
|
||||
/**
|
||||
* 设置 Uno 状态
|
||||
* @param x Uno 状态
|
||||
*/
|
||||
void setIsUno(bool x);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user