From a197a92893cff416b63da359db8c8059c7f333bf Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Wed, 3 Jun 2015 22:11:59 +0200 Subject: Added remaining objects for game state --- include/enemy_bullet.h | 2 ++ include/game_state.h | 4 ++-- include/player_missile.h | 1 + include/shield.h | 1 + include/spacebot.h | 2 +- include/spaceship.h | 2 ++ 6 files changed, 9 insertions(+), 3 deletions(-) (limited to 'include') 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 -#include +#include class GameState { public: - GameState(std::istream& mapFile); + GameState(std::string mapFilename); private: std::vector aliens; std::vector 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; -- cgit v1.2.3