diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2015-06-03 22:11:59 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2015-06-03 22:11:59 +0200 |
commit | a197a92893cff416b63da359db8c8059c7f333bf (patch) | |
tree | 7ff3c908a73231edda1f2ba7308a98da599f9169 /include | |
parent | e42727977b3dab7aecff0ce8afa5b16abcd8b26b (diff) |
Added remaining objects for game state
Diffstat (limited to 'include')
-rw-r--r-- | include/enemy_bullet.h | 2 | ||||
-rw-r--r-- | include/game_state.h | 4 | ||||
-rw-r--r-- | include/player_missile.h | 1 | ||||
-rw-r--r-- | include/shield.h | 1 | ||||
-rw-r--r-- | include/spacebot.h | 2 | ||||
-rw-r--r-- | include/spaceship.h | 2 |
6 files changed, 9 insertions, 3 deletions
diff --git a/include/enemy_bullet.h b/include/enemy_bullet.h index f08d988..db3fcf9 100644 --- a/include/enemy_bullet.h +++ b/include/enemy_bullet.h @@ -3,6 +3,8 @@ class EnemyBullet { public: EnemyBullet(int x, int y); + const static char ALIEN_MAP_CHAR = '|'; + const static char ENEMY_MISSILE_MAP_CHAR = 'i'; private: int x; int y; diff --git a/include/game_state.h b/include/game_state.h index aa49fc8..defe691 100644 --- a/include/game_state.h +++ b/include/game_state.h @@ -6,12 +6,12 @@ #include "shield.h" #include "spaceship.h" #include <vector> -#include <iostream> +#include <string> class GameState { public: - GameState(std::istream& mapFile); + GameState(std::string mapFilename); private: std::vector<Alien> aliens; std::vector<EnemyBullet> bullets; diff --git a/include/player_missile.h b/include/player_missile.h index 22c60ec..6f304df 100644 --- a/include/player_missile.h +++ b/include/player_missile.h @@ -4,6 +4,7 @@ class PlayerMissile { public: PlayerMissile(int x, int y); + const static char MAP_CHAR = '!'; private: int x; int y; diff --git a/include/shield.h b/include/shield.h index b113bdd..bd64e3e 100644 --- a/include/shield.h +++ b/include/shield.h @@ -3,6 +3,7 @@ class Shield { public: Shield(int x, int y); + const static char MAP_CHAR = '-'; private: int x; int y; diff --git a/include/spacebot.h b/include/spacebot.h index b152197..9b89383 100644 --- a/include/spacebot.h +++ b/include/spacebot.h @@ -9,7 +9,7 @@ public: Spacebot(std::string outputPath); void writeNextMove(); private: - std::string outputPath; + std::string outputFilename; GameState gameState; void writeMove(const Move& move); Move chooseMove(); diff --git a/include/spaceship.h b/include/spaceship.h index e4ee37b..5e6afd0 100644 --- a/include/spaceship.h +++ b/include/spaceship.h @@ -3,6 +3,8 @@ class Spaceship { public: Spaceship(int x, int y); + const static char ENEMY_MAP_CHAR = 'V'; + const static char PLAYER_MAP_CHAR = 'A'; private: int x; int y; |