HOG2
|
A unit that moves in random directions for every step. More...
#include <RandomUnits.h>
Public Member Functions | |
RandomerUnit (int _x, int _y) | |
const char * | GetName () |
bool | MakeMove (MapEnvironment *, OccupancyInterface< xyLoc, tDirection > *, MapSimulationInfo *, tDirection &dir) |
Make a random move. More... | |
Public Member Functions inherited from MapUnit | |
MapUnit (int x, int y) | |
virtual void | UpdateLocation (MapEnvironment *, xyLoc &l, bool, MapSimulationInfo *) |
virtual void | GetLocation (xyLoc &l) |
virtual void | OpenGLDraw (const MapEnvironment *, const MapSimulationInfo *) const |
virtual void | GetGoal (xyLoc &s) |
Public Member Functions inherited from Unit< xyLoc, tDirection, MapEnvironment > | |
Unit () | |
virtual | ~Unit () |
virtual bool | Done () |
virtual double | GetSpeed () |
void | SetSpeed (double s) |
virtual void | LogStats (StatCollection *) |
log an stats that may have been computed during the last run More... | |
virtual void | LogFinalStats (StatCollection *) |
log any final one-time stats before a simulation is ended More... | |
virtual void | SetColor (GLfloat _r, GLfloat _g, GLfloat _b) |
virtual void | GetColor (GLfloat &_r, GLfloat &_g, GLfloat &_b) const |
UnitGroup< xyLoc, tDirection, MapEnvironment > * | GetUnitGroup () |
void | SetUnitGroup (UnitGroup< xyLoc, tDirection, MapEnvironment > *_group) |
virtual unsigned int | GetNum () |
virtual void | SetNum (unsigned int num) |
virtual void | StartNewTrial (StatCollection *) |
virtual int | GetPriority () |
virtual void | SetPriority (int val) |
Additional Inherited Members | |
Protected Attributes inherited from MapUnit | |
GLfloat | r |
GLfloat | g |
GLfloat | b |
xyLoc | loc |
A unit that moves in random directions for every step.
Definition at line 52 of file RandomUnits.h.
|
inline |
Definition at line 54 of file RandomUnits.h.
|
inlinevirtual |
Implements Unit< xyLoc, tDirection, MapEnvironment >.
Definition at line 56 of file RandomUnits.h.
|
virtual |
Make a random move.
the random unit follows a certain direction for a random amount of time, and then picks a new direction. makeMove just returns the current direction.
Implements Unit< xyLoc, tDirection, MapEnvironment >.
Definition at line 50 of file RandomUnits.cpp.
References possibleDir.