Deep RTS
Pathfinder.h
Go to the documentation of this file.
1//
2// Created by Per-Arne on 26.02.2017.
3//
4
5#ifndef WARC2SIM_PATHFINDER_H
6#define WARC2SIM_PATHFINDER_H
7
8#include <list>
9#include <queue>
10#include <unordered_map>
11#include <vector>
12#include <map>
13#include <set>
14class Tile;
15
17
18public:
19 static bool aStar(std::vector<Tile *> &constructedPath, Tile *start, Tile *goal);
20
21 static double heuristic(Tile *pTile, Tile *next);
22
23 static double crossover(Tile *pTile, Tile *start, Tile *goal);
24
25 [[maybe_unused]] static Tile * find_closest_walkable_tile(Tile * start, Tile * destination, int range);
26
27 static Tile *find_first_walkable_tile(Tile *start);
28
30
31
32 static std::vector<Tile *> reconstruct_path(Tile *start, Tile *goal, std::unordered_map<Tile*, Tile*>& came_from);
33
34 static Tile *find_first_attackable_tile(Tile *start);
35};
36
37
38#endif //WARC2SIM_PATHFINDER_H
Definition: Pathfinder.h:16
static bool aStar(std::vector< Tile * > &constructedPath, Tile *start, Tile *goal)
Definition: Pathfinder.cpp:18
static Tile * find_closest_walkable_tile(Tile *start, Tile *destination, int range)
Definition: Pathfinder.cpp:79
static double heuristic(Tile *pTile, Tile *next)
Definition: Pathfinder.cpp:62
static Tile * find_first_walkable_tile(Tile *start)
Definition: Pathfinder.cpp:113
static Tile * find_first_attackable_tile(Tile *start)
Definition: Pathfinder.cpp:183
static std::vector< Tile * > reconstruct_path(Tile *start, Tile *goal, std::unordered_map< Tile *, Tile * > &came_from)
Definition: Pathfinder.cpp:216
static Tile * find_first_harvestable_tile(Tile *pTile)
Definition: Pathfinder.cpp:151
static double crossover(Tile *pTile, Tile *start, Tile *goal)
Definition: Pathfinder.cpp:69
Definition: Tile.h:21