mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
fix(game): add construct function of ClientGameState
This commit is contained in:
@@ -41,6 +41,11 @@ namespace UNO::GAME {
|
||||
this->isUno_ = x;
|
||||
}
|
||||
|
||||
ClientPlayerState::ClientPlayerState(std::string name, size_t remainingCardCount, bool isUno) :
|
||||
PlayerState(name, remainingCardCount, isUno)
|
||||
{
|
||||
}
|
||||
|
||||
ServerPlayerState::ServerPlayerState(std::string name, size_t remainingCardCount, bool isUno, HandCard *handCard) :
|
||||
PlayerState(std::move(name), remainingCardCount, isUno), handCard_(handCard)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,10 @@ namespace UNO::GAME {
|
||||
/**
|
||||
* (供客户端使用)玩家状态
|
||||
*/
|
||||
class ClientPlayerState : public PlayerState {};
|
||||
class ClientPlayerState : public PlayerState {
|
||||
public:
|
||||
ClientPlayerState(std::string name, size_t remainingCardCount, bool isUno);
|
||||
};
|
||||
|
||||
/**
|
||||
* (供服务端使用)玩家状态
|
||||
|
||||
Reference in New Issue
Block a user