Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

rhrUnit Class Reference

A simple unit that attempts to follow walls using the right hand rule. More...

#include <unit.h>

Inheritance diagram for rhrUnit:

Inheritance graph
[legend]
Collaboration diagram for rhrUnit:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 rhrUnit (int _x, int _y)
tDirection makeMove (mapProvider *mp, reservationProvider *rp, simulationInfo *simInfo)
 Make the next move.

void updateLocation (int _x, int _y, bool, simulationInfo *)
 set rhr unit location.


Private Attributes

int lastIndex

Detailed Description

A simple unit that attempts to follow walls using the right hand rule.


Constructor & Destructor Documentation

rhrUnit::rhrUnit int  _x,
int  _y
[inline]
 


Member Function Documentation

tDirection rhrUnit::makeMove mapProvider mp,
reservationProvider rp,
simulationInfo simInfo
[virtual]
 

Make the next move.

Make the next move following the right hand rule.

Reimplemented from unit.

void rhrUnit::updateLocation int  _x,
int  _y,
bool  success,
simulationInfo
[virtual]
 

set rhr unit location.

To follow the right hand rule, we do the following: 1) if the last move was successful, turn 90 degrees to the right and keep going. 2) if the last move wasn't successful, turn 90 degrees to the left and keep going.

Reimplemented from unit.


Member Data Documentation

int rhrUnit::lastIndex [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Aug 18 03:45:29 2009 for HOG by doxygen 1.3.4