From 1da1c8d213ce710a9cafdd560d0d3d3c7fb74d70 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Wed, 12 Aug 2015 23:18:56 +0200 Subject: Changing how gamestate is interpreted into network --- include/game_state.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/game_state.h') diff --git a/include/game_state.h b/include/game_state.h index 482dd7d..880557e 100644 --- a/include/game_state.h +++ b/include/game_state.h @@ -8,6 +8,7 @@ #include #include #include +#include class GameState { @@ -19,7 +20,9 @@ public: const std::vector& bullets() const { return _bullets; } const std::vector& missiles() const { return _missiles; } const std::vector& shields() const { return _shields; } - const std::vector& spaceships() const { return _spaceships; } + + const std::unique_ptr& playerSpaceship() const { return _playerSpaceship; } + const std::unique_ptr& enemySpaceship() const { return _enemySpaceship; } std::vector toBitArray() const; @@ -28,7 +31,8 @@ private: std::vector _bullets; std::vector _missiles; std::vector _shields; - std::vector _spaceships; + std::unique_ptr _playerSpaceship; + std::unique_ptr _enemySpaceship; int addEntity(int x, int y, char type); }; -- cgit v1.2.3