HOG2
|
A simple map-based unit. More...
#include <MapUnit.h>
Public Member Functions | |
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 const char * | GetName ()=0 |
virtual bool | MakeMove (MapEnvironment *, OccupancyInterface< xyLoc, tDirection > *, SimulationInfo< xyLoc, tDirection, MapEnvironment > *, tDirection &a)=0 |
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) |
Protected Attributes | |
GLfloat | r |
GLfloat | g |
GLfloat | b |
xyLoc | loc |
|
inline |
|
inlinevirtual |
Reimplemented from Unit< xyLoc, tDirection, MapEnvironment >.
Definition at line 32 of file MapUnit.h.
References loc.
|
inlinevirtual |
Implements Unit< xyLoc, tDirection, MapEnvironment >.
Definition at line 29 of file MapUnit.h.
References loc.
|
virtual |
Implements Unit< xyLoc, tDirection, MapEnvironment >.
Definition at line 13 of file MapUnit.cpp.
References b, DrawSphere(), g, MapEnvironment::GetMap(), Map::GetMapHeight(), Map::GetMapWidth(), Map::GetOpenGLCoord(), r, loc::x, and loc::y.
|
inlinevirtual |
Implements Unit< xyLoc, tDirection, MapEnvironment >.
Reimplemented in BilliardBallUnit, and RHRUnit.
Definition at line 27 of file MapUnit.h.
Referenced by RandomUnit< state, action, environment >::UpdateLocation(), and BilliardBallUnit::UpdateLocation().
|
protected |
Definition at line 34 of file MapUnit.h.
Referenced by MapUnit(), and OpenGLDraw().
|
protected |
Definition at line 34 of file MapUnit.h.
Referenced by MapUnit(), and OpenGLDraw().
|
protected |
Definition at line 35 of file MapUnit.h.
Referenced by GetGoal(), and GetLocation().
|
protected |
Definition at line 34 of file MapUnit.h.
Referenced by MapUnit(), and OpenGLDraw().