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> players_;
|
||||||
std::vector<PlayerStateType>::iterator currentPlayer_;
|
std::vector<PlayerStateType>::iterator currentPlayer_;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 反转
|
||||||
|
*/
|
||||||
|
void reverse();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下一个玩家
|
||||||
|
*/
|
||||||
|
void nextPlayer();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~GameState() = default;
|
virtual ~GameState() = default;
|
||||||
/**
|
/**
|
||||||
@@ -135,21 +145,11 @@ namespace UNO::GAME {
|
|||||||
*/
|
*/
|
||||||
void addPlayer(PlayerStateType playerState);
|
void addPlayer(PlayerStateType playerState);
|
||||||
|
|
||||||
/**
|
|
||||||
* 下一个玩家
|
|
||||||
*/
|
|
||||||
void nextPlayer();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清空玩家
|
* 清空玩家
|
||||||
*/
|
*/
|
||||||
void clearPlayers();
|
void clearPlayers();
|
||||||
|
|
||||||
/**
|
|
||||||
* 反转
|
|
||||||
*/
|
|
||||||
void reverse();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 由于用户出牌而改变状态
|
* 由于用户出牌而改变状态
|
||||||
* @param card 用户出的牌
|
* @param card 用户出的牌
|
||||||
|
|||||||
Reference in New Issue
Block a user