HOG2
PRAStarUnit.h
Go to the documentation of this file.
1 /*
2  * $Id: praStarUnit.h
3  * hog2
4  *
5  * Created by Nathan Sturtevant on 1/16/05.
6  * Modified by Nathan Sturtevant on 02/29/20.
7  *
8  * This file is part of HOG2. See https://github.com/nathansttt/hog2 for licensing information.
9  *
10  */
11 
12 #include "PRAStar.h"
13 
14 #ifndef PRASTARUNIT_H
15 #define PRASTARUNIT_H
16 
17 #include "SearchUnit.h"
18 
23 class praStarUnit : public SearchUnit {
24 public:
25  praStarUnit(int _x, int _y, unit *_target, praStar *_alg);
26 // praStarUnit(int _x, int _y, int _r, int _g, int _b, unit *_target, praStar *_alg);
27  ~praStarUnit() { delete cache; }
28  const char *GetName() { sprintf(name, "c%s", algorithm->GetName()); return name; }
30 private:
33 char name[32];
34 };
35 
36 #endif
praStarUnit::algorithm
praStar * algorithm
Definition: PRAStarUnit.h:32
SimulationInfo
Definition: SimulationInfo.h:13
MapProvider
Definition: MapProvider.h:23
praStarUnit::name
char name[32]
Definition: PRAStarUnit.h:33
praStarUnit::makeMove
tDirection makeMove(MapProvider *, reservationProvider *, SimulationInfo *simInfo)
Definition: PRAStarUnit.cpp:23
praStarUnit::cache
path * cache
Definition: PRAStarUnit.h:31
SearchUnit
A general unit which collects path information from a SearchAlgorithm and incrementally executes that...
Definition: SearchUnit.h:26
praStarUnit::~praStarUnit
~praStarUnit()
Definition: PRAStarUnit.h:27
tDirection
tDirection
Definition: Map2DEnvironment.h:77
praStarUnit::GetName
const char * GetName()
Definition: PRAStarUnit.h:28
praStar::GetName
virtual const char * GetName()
Definition: PRAStar.h:29
SearchUnit.h
PRAStar.h
praStarUnit
A unit which caches path information to speed pra*.
Definition: PRAStarUnit.h:23
reservationProvider
Definition: ReservationProvider.h:33
praStar
The pra* search algorithm which does partial pathfinding using abstraction.
Definition: PRAStar.h:23
praStarUnit::praStarUnit
praStarUnit(int _x, int _y, unit *_target, praStar *_alg)
Definition: PRAStarUnit.cpp:14
path
A linked list of nodes which form a continuous path.
Definition: Path.h:20