mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
feat(game): add getSelfId method to ClientGameState
This commit is contained in:
@@ -318,16 +318,23 @@ namespace UNO::GAME {
|
||||
public:
|
||||
ClientGameState();
|
||||
|
||||
/**
|
||||
* 设置玩家名字
|
||||
*/
|
||||
void setPlayerName(const std::string &name);
|
||||
/**
|
||||
* 获取当前玩家的名字
|
||||
* @return 玩家名字
|
||||
*/
|
||||
[[nodiscard]] std::string getPlayerName() const;
|
||||
|
||||
/**
|
||||
* 设置玩家名字
|
||||
*/
|
||||
void setPlayerName(const std::string &name);
|
||||
|
||||
/**
|
||||
* 获取客户端对应的玩家 ID
|
||||
* @return 客户端对应的玩家 ID
|
||||
*/
|
||||
[[nodiscard]] size_t getSelfId() const;
|
||||
|
||||
/**
|
||||
* 获得当前手牌
|
||||
* @return 当前手牌的集合
|
||||
|
||||
Reference in New Issue
Block a user