mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
feat(game): add getDrawCount method to GameState
This commit is contained in:
@@ -139,6 +139,8 @@ namespace UNO::GAME {
|
|||||||
*/
|
*/
|
||||||
[[nodiscard]] bool getIsReversed() const;
|
[[nodiscard]] bool getIsReversed() const;
|
||||||
|
|
||||||
|
[[nodiscard]] size_t getDrawCount() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 向对局中添加玩家
|
* 向对局中添加玩家
|
||||||
* @param playerState 要添加的玩家状态
|
* @param playerState 要添加的玩家状态
|
||||||
@@ -192,6 +194,13 @@ namespace UNO::GAME {
|
|||||||
return this->isReversed_;
|
return this->isReversed_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<PlayerStateTypeConcept PlayerStateType>
|
||||||
|
size_t GameState<PlayerStateType>::getDrawCount() const
|
||||||
|
{
|
||||||
|
return this->drawCount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<PlayerStateTypeConcept PlayerStateType>
|
template<PlayerStateTypeConcept PlayerStateType>
|
||||||
void GameState<PlayerStateType>::addPlayer(PlayerStateType playerState)
|
void GameState<PlayerStateType>::addPlayer(PlayerStateType playerState)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user