#ifndef DNG_LEVEL_H #define DNG_LEVEL_H static const char PLAYER_TKN = 'p'; static const char WALL_TKN = 'w'; static const char EMPTY_TKN = '0'; static const char TREASURE_TKN = 't'; static const char ENEMY_TKN = 'e'; static const char BLANK_SPACE = '\0'; static const char WALL_SPACE = '#'; #include #include struct Pos { int id; int x; int y; } typedef Coord; class Level { public: void loadLevelFromFile(const char *filePath); bool isEmpty(int x, int y); bool playerCanStep(int dx, int dy); int getEnemyIndex(int id); bool enemyCanStep(Pos pos, int dx, int dy); void print(); int nextId(); std::vector> map; Pos player; std::vector enemyPositions; std::vector treasurePositions; private: int idCounter = 1; // defaults at 1 (player always 0) }; #endif // DNG_LEVEL_H