diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2015-06-08 21:21:08 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2015-06-08 21:21:08 +0200 |
commit | 72eaaeb60916e736de6c1aaa3d1047663bce19d9 (patch) | |
tree | 9d11b011144c83f8d64ea6eb994573dfd9b83ae5 /include/game_state.h | |
parent | 0ef4646a9c19d3d88ffb7674123ccdc0a9012d98 (diff) |
Started adding test for reading game state
Diffstat (limited to 'include/game_state.h')
-rw-r--r-- | include/game_state.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/game_state.h b/include/game_state.h index 1b35fc6..7ccef54 100644 --- a/include/game_state.h +++ b/include/game_state.h @@ -7,18 +7,22 @@ #include "spaceship.h" #include <vector> #include <string> +#include <istream> class GameState { public: - GameState(std::string mapFilename); + GameState(std::istream &&mapFile); void logState(); + + const std::vector<Alien>& aliens() const { return _aliens; } + private: - std::vector<Alien> aliens; - std::vector<EnemyBullet> bullets; - std::vector<PlayerMissile> missiles; - std::vector<Shield> shields; - std::vector<Spaceship> spaceships; + std::vector<Alien> _aliens; + std::vector<EnemyBullet> _bullets; + std::vector<PlayerMissile> _missiles; + std::vector<Shield> _shields; + std::vector<Spaceship> _spaceships; int addEntity(int x, int y, char type); }; |