diff options
Diffstat (limited to 'src/Level.h')
-rw-r--r-- | src/Level.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Level.h b/src/Level.h index 1607f0c..7791ab6 100644 --- a/src/Level.h +++ b/src/Level.h @@ -12,30 +12,32 @@ static const char WALL_SPACE = '#'; #include <memory> #include <vector> -struct Pos -{ +struct Pos { int id; int x; int y; } typedef Coord; -class Level -{ +class Level { public: - void loadLevelFromFile(const char* filePath); + void loadLevelFromFile(const char *filePath); bool isEmpty(int x, int y); - bool canStep(int dx, int dy); + bool playerCanStep(int dx, int dy); + + int getEnemyIndex(int id); + + bool enemyCanStep(Pos pos, int dx, int dy); void print(); int nextId(); - std::vector<std::vector<char>> map; Pos player; std::vector<Pos> enemyPositions; + std::vector<Pos> treasurePositions; private: |