[cpp] add method to GameBoard
This commit is contained in:
parent
e5a51167f3
commit
abae7d6f8e
@ -14,7 +14,7 @@ struct PlayerState {
|
|||||||
Player id;
|
Player id;
|
||||||
Team team;
|
Team team;
|
||||||
bool is_defeated;
|
bool is_defeated;
|
||||||
std::deque<PlayerMove> tasks;
|
std::deque<PlayerMove> orders;
|
||||||
|
|
||||||
PlayerState();
|
PlayerState();
|
||||||
};
|
};
|
||||||
@ -40,6 +40,14 @@ public:
|
|||||||
std::uint8_t numPlayers() const;
|
std::uint8_t numPlayers() const;
|
||||||
std::uint8_t numTeams() const;
|
std::uint8_t numTeams() const;
|
||||||
|
|
||||||
|
void appendOrderQueue(const PlayerMove &p);
|
||||||
|
void clearOrderQueue(Player p);
|
||||||
|
void popOrderQueue(Player p);
|
||||||
|
void setOffline(Player x);
|
||||||
|
|
||||||
|
std::vector<Tile> getViewOf(Team x) const;
|
||||||
|
GameState tick();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void capitalCaptured(Player target, Player source);
|
void capitalCaptured(Player target, Player source);
|
||||||
void updatedPosition(pos_t x, pos_t y);
|
void updatedPosition(pos_t x, pos_t y);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user