#pragma once #include #include "App.h" #include class Pather; class node { public: node(sf::Vector2i XY, double h, int cF, int cL, node* p, Pather* pather_); node(); ~node(); sf::Vector2i xy; // Ugh, pointers, ugh c++ node* parent; double hueristic; int cameFrom; int closedList; Pather* pather; void neighbors(); private: }; class Pather { public: Pather(Map* map_); ~Pather(); Map* map; std::unordered_map openList; std::unordered_map closedList; MultiArray visitedMap; //int visitedMap[App::WINDOW_HEIGHT][App::WINDOW_WIDTH]; std::deque pathTo(sf::Vector2i start, sf::Vector2i end); std::deque loop(); std::deque returnPath(); sf::Vector2i getEndNodePosition(); node* start_node; node* active_node; bool no_path = false; bool early_exit; private: std::deque path_list; node* end_node; };