diff --git a/src/game/GameState.h b/src/game/GameState.h index 9a9665e..5e91b90 100644 --- a/src/game/GameState.h +++ b/src/game/GameState.h @@ -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 当前手牌的集合