|
|
Class Coordinator
~Coordinator ()
throw() | ~Coordinator |
[virtual]
Destructor, does nothing
void resetGame ()
throw (StrategyException,bad_exception) | resetGame |
[pure virtual]
Calls reset on all state objects and sets the current state to the beginning state.
void processReceivedRTBMessages ()
throw (StrategyException,bad_exception) | processReceivedRTBMessages |
[pure virtual]
This method has to be invoked after all messages sent by the rtb server in this round were processed by the receiveRTBMessage..... methods.
string getAssociatedRobotName ()
throw (bad_exception) | getAssociatedRobotName |
[pure virtual]
void receiveRTBMessageRadar (double dist,object_type type,double angle)
throw (StrategyException, bad_exception) | receiveRTBMessageRadar |
[pure virtual]
This method is called when the RTB message "Radar [dist] [type] [angle]" occurs. This message occurs each turn and gives information about the closest object in the direction the radar points to.
Parameters:
dist | The distance of the observed object |
type | The type of the observed object |
angle | The angle the observed object is seen at in rad, relative to the robot front |
void receiveRTBMessageInfo (double time,double speed,double cannonAngle)
throw (StrategyException, bad_exception) | receiveRTBMessageInfo |
[pure virtual]
This method is called when the RTB message "Info [time] [speed] [cannonAngle]" occurs. This message is sent each turn and gives information about the robot itself.
Parameters:
time | The time that has elapsed since the game had started |
speed | The velocity of the robot |
cannonAngle | The angle the cannon points to |
void receiveRTBMessageCoordinates (double x,double y,double angle)
throw (StrategyException, bad_exception) | receiveRTBMessageCoordinates |
[pure virtual]
This method is called when the RTB message "Coordinates [x] [y] [angle]" occurs. Generally, this message is sent each turn. If the game option SEND_ROBOT_COORDINATES is sent to 2, absolute coordinates are sent. If this value is 1, the coordinates are given relative to the starting point. On the case 0, this message is not sent.
Parameters:
x | And ... |
y | ... are the sent coordinates |
angle | is the angle the robot front points to |
void receiveRTBMessageRobotInfo (double energy,bool isTeamMate)
throw (StrategyException, bad_exception) | receiveRTBMessageRobotInfo |
[pure virtual]
This method is called when the RTB message "RobotInfo [energy] [isTeamMate]" occurs. This message is always sent after another robot has been detected by the radar. It gives some information about this might-be foe.
Parameters:
energy | The unexact energy level of the detected robot |
isTeamMate | Defines whether the robot is a team mate (team mode is not yet implemented in RTB) |
void receiveRTBMessageRotationReached (int what)
throw (StrategyException, bad_exception) | receiveRTBMessageRotationReached |
[pure virtual]
This method is called when the RTB message "RotationReached [what]" occurs. In our case, this message is sent, when a rotation initiated by "RotateTo" or "RotateAmount" has finished or the sweeping has changed direction. param what What this message bears on; 1 = Robot, 2 = Cannon, 4 = Radar
void receiveRTBMessageEnergy (double energy)
throw (StrategyException, bad_exception) | receiveRTBMessageEnergy |
[pure virtual]
This method is called when the RTB message "Energy [energy]" occurs. This message is sent at the end of each turn and specifies the health state of the robot.
Parameters:
energy | The unexact energy level |
void receiveRTBMessageRobotsLeft (int num)
throw () | receiveRTBMessageRobotsLeft |
[pure virtual]
This method is called when the RTB message "RobotsLeft [num]" occurs. This message is sent at the beginning of the game and after a robot has been killed.
Parameters:
num | The number of remaining robots |
void receiveRTBMessageCollision (object_type type,double angle)
throw (StrategyException, bad_exception) | receiveRTBMessageCollision |
[pure virtual]
This method is called when the RTB message "Collision [type] [angle]" occurs. This message is sent whan the robot has been hit by or hits another object,
Parameters:
type | The type of the hit object |
angle | The angle the collision happened at in rad, relative to the robot front |
void receiveRTBMessageWarning (warning_type warning,const string& message)
throw (StrategyException, bad_exception) | receiveRTBMessageWarning |
[pure virtual]
This method is called when the RTB message "Warning [warning] [message]" occurs. This message when RTB has notify the robot on a problem
Parameters:
warning | The type of the warning |
message | The text of the warning |
void receiveRTBMessageDead ()
throw (StrategyException, bad_exception) | receiveRTBMessageDead |
[pure virtual]
This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out.
Generated by: jonico on sc8-pr-shell1.sourceforge.net on Fri May 27 06:03:12 2005, using kdoc 2.0a54. |