HOG2
Public Member Functions | Protected Attributes | List of all members
MapUnit Class Reference

A simple map-based unit. More...

#include <MapUnit.h>

Inheritance diagram for MapUnit:
Inheritance graph
[legend]
Collaboration diagram for MapUnit:
Collaboration graph
[legend]

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
 

Detailed Description

A simple map-based unit.

Definition at line 22 of file MapUnit.h.

Constructor & Destructor Documentation

◆ MapUnit()

MapUnit::MapUnit ( int  x,
int  y 
)
inline

Definition at line 24 of file MapUnit.h.

References b, g, and r.

Member Function Documentation

◆ GetGoal()

virtual void MapUnit::GetGoal ( xyLoc s)
inlinevirtual

Reimplemented from Unit< xyLoc, tDirection, MapEnvironment >.

Definition at line 32 of file MapUnit.h.

References loc.

◆ GetLocation()

virtual void MapUnit::GetLocation ( xyLoc l)
inlinevirtual

Implements Unit< xyLoc, tDirection, MapEnvironment >.

Definition at line 29 of file MapUnit.h.

References loc.

◆ OpenGLDraw()

void MapUnit::OpenGLDraw ( const MapEnvironment me,
const MapSimulationInfo  
) const
virtual

◆ UpdateLocation()

virtual void MapUnit::UpdateLocation ( MapEnvironment ,
xyLoc l,
bool  ,
MapSimulationInfo  
)
inlinevirtual

Member Data Documentation

◆ b

GLfloat MapUnit::b
protected

Definition at line 34 of file MapUnit.h.

Referenced by MapUnit(), and OpenGLDraw().

◆ g

GLfloat MapUnit::g
protected

Definition at line 34 of file MapUnit.h.

Referenced by MapUnit(), and OpenGLDraw().

◆ loc

xyLoc MapUnit::loc
protected

Definition at line 35 of file MapUnit.h.

Referenced by GetGoal(), and GetLocation().

◆ r

GLfloat MapUnit::r
protected

Definition at line 34 of file MapUnit.h.

Referenced by MapUnit(), and OpenGLDraw().


The documentation for this class was generated from the following files: