#include <unit.h>
Inheritance diagram for rhrUnit:
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 |
|
|
|
Make the next move. Make the next move following the right hand rule. Reimplemented from unit. |
|
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. |
|
|