mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
fix(game): update reverse and nextPlayer in GameState to protected
This commit is contained in:
@@ -107,6 +107,16 @@ namespace UNO::GAME {
|
||||
std::vector<PlayerStateType> players_;
|
||||
std::vector<PlayerStateType>::iterator currentPlayer_;
|
||||
|
||||
/**
|
||||
* 反转
|
||||
*/
|
||||
void reverse();
|
||||
|
||||
/**
|
||||
* 下一个玩家
|
||||
*/
|
||||
void nextPlayer();
|
||||
|
||||
public:
|
||||
virtual ~GameState() = default;
|
||||
/**
|
||||
@@ -135,21 +145,11 @@ namespace UNO::GAME {
|
||||
*/
|
||||
void addPlayer(PlayerStateType playerState);
|
||||
|
||||
/**
|
||||
* 下一个玩家
|
||||
*/
|
||||
void nextPlayer();
|
||||
|
||||
/**
|
||||
* 清空玩家
|
||||
*/
|
||||
void clearPlayers();
|
||||
|
||||
/**
|
||||
* 反转
|
||||
*/
|
||||
void reverse();
|
||||
|
||||
/**
|
||||
* 由于用户出牌而改变状态
|
||||
* @param card 用户出的牌
|
||||
|
||||
Reference in New Issue
Block a user