// // Created by trotfunky on 06/06/19. // #ifndef SRC_LEVEL_H #define SRC_LEVEL_H #include #include #include #include #include #include #include "Utils.h" #include "Entity.h" using TextureStore = std::vector>; class Level { public: Level(const pugi::xml_document& xmlDoc, const TextureStore& textureStore); void render(sf::RenderWindow& renderWindow) const; void runStep(); private: const pro_maat::GridPos size; std::vector entities; const TextureStore& textures; // // Pathfinding // std::vector occupiedSquares; /// If sign is +1, finds a path between start and goal positions. /// If sign is -1, finds a path away from the goal position, from the starting position. /// THIS DOES NOT HANDLE ENTITIES BIGGER THAN ONE SQUARE /// /// \param start Starting position /// \param goal Goal position /// \param sign +1 or -1, defines if we go towards or away from the goal /// \return Orientation of the next move if successful, Orientation::None otherwise. Orientation findPath(pro_maat::GridPos start, pro_maat::GridPos goal, int sign); }; #endif //SRC_LEVEL_H