HOG2
|
#include <RewardUnit.h>
Public Member Functions | |
rewardSeekingUnit (int x, int y) | |
virtual const char * | GetName () |
virtual void | receiveReward (double) |
virtual tDirection | makeMove (MapProvider *, reservationProvider *, SimulationInfo *simInfo) |
void | OpenGLDraw (const MapProvider *, const SimulationInfo *) const |
void | addRewardLocation (rewardUnit *) |
Public Member Functions inherited from rewardUnit | |
rewardUnit (int x, int y) | |
virtual double | sendReward () |
void | OpenGLDraw (const MapProvider *, const SimulationInfo *) const |
Private Member Functions | |
double | goToRewardLoc (MapAbstraction *aMap, int which) |
void | addPathToCache (path *p) |
Private Attributes | |
std::vector< tDirection > | moves |
std::vector< rewardUnit * > | rewardLocs |
aStar | a |
Definition at line 28 of file RewardUnit.h.
rewardSeekingUnit::rewardSeekingUnit | ( | int | x, |
int | y | ||
) |
Definition at line 31 of file RewardUnit.cpp.
|
private |
Definition at line 109 of file RewardUnit.cpp.
References node::GetLabelL(), GetName(), kE, GraphAbstractionConstants::kFirstData, kN, kS, kStay, kW, moves, path::n, and path::next.
Referenced by goToRewardLoc().
void rewardSeekingUnit::addRewardLocation | ( | rewardUnit * | ru | ) |
Definition at line 104 of file RewardUnit.cpp.
References rewardLocs.
|
inlinevirtual |
Reimplemented from rewardUnit.
Definition at line 31 of file RewardUnit.h.
Referenced by addPathToCache(), and receiveReward().
|
private |
Definition at line 61 of file RewardUnit.cpp.
References a, addPathToCache(), aStar::GetPath(), and rewardLocs.
Referenced by makeMove().
|
virtual |
Definition at line 42 of file RewardUnit.cpp.
References MapProvider::GetMapAbstraction(), goToRewardLoc(), kStay, moves, and rewardLocs.
void rewardSeekingUnit::OpenGLDraw | ( | const MapProvider * | mp, |
const SimulationInfo * | |||
) | const |
Definition at line 79 of file RewardUnit.cpp.
References MapProvider::GetMap(), Map::GetOpenGLCoord(), kE, kN, kS, kW, and moves.
|
virtual |
|
private |
Definition at line 41 of file RewardUnit.h.
Referenced by goToRewardLoc().
|
private |
Definition at line 39 of file RewardUnit.h.
Referenced by addPathToCache(), makeMove(), and OpenGLDraw().
|
private |
Definition at line 40 of file RewardUnit.h.
Referenced by addRewardLocation(), goToRewardLoc(), and makeMove().