17 std::vector<std::vector<Node*>>
nodes;
49 void nodeTest(
int parentX,
int parentY,
int testX,
int testY,
int cost);
67 AStar(
int xNodes,
int yNodes);
83 void findNewPath(
int startX,
int startY,
int endX,
int endY);
Vec2 getNextPathNode()
Definition: aStar.cpp:222
int yNodes
Definition: aStar.h:23
int currentY
Definition: aStar.h:26
void findBestPath()
Definition: aStar.cpp:237
Creates a Vec2 structure with functions Creates a Vec2 structure with overloaded operators to create ...
Definition: vec2.h:7
void nodeTest(int parentX, int parentY, int testX, int testY, int cost)
Definition: aStar.cpp:157
~AStar()
Definition: aStar.cpp:28
std::vector< std::vector< Node * > > nodes
Definition: aStar.h:17
std::vector< Node > openList
Definition: aStar.h:18
int endX
Definition: aStar.h:28
int xNodes
Definition: aStar.h:22
int startY
Definition: aStar.h:32
std::vector< Node > closedList
Definition: aStar.h:19
void findNewPath(int startX, int startY, int endX, int endY)
Definition: aStar.cpp:52
int startX
Definition: aStar.h:31
int endY
Definition: aStar.h:29
Creates an object for A* path finding Made using help from http://www.policyalmanac.org/games/aStarTutorial.htm.
Definition: aStar.h:13
int currentX
Definition: aStar.h:25
AStar(int xNodes, int yNodes)
Definition: aStar.cpp:6
void findNextNode()
Definition: aStar.cpp:193
void setDangerNode(int nodeXIndex, int nodeYIndex)
Definition: aStar.cpp:43
void drawLists(SDL_Renderer *renderer)
Definition: aStar.cpp:280
std::vector< Node > bestPath
Definition: aStar.h:20
void checkNodes(int parentX, int parentY)
Definition: aStar.cpp:127