class CoordinatorComposite

Class CoordinatorComposite This class was specially designed for combining the local ServerCoordinator and the LocalClientCoordinator in order not to have a distinction between local and remote clients. More...

Full nameGameControl::CoordinatorComposite
Definition#include <coordinatorcomposite.h>
InheritsGameControl::Coordinator [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Private Methods

Private Members


Detailed Description

Class CoordinatorComposite This class was specially designed for combining the local ServerCoordinator and the LocalClientCoordinator in order not to have a distinction between local and remote clients.

TODO: Add all receiveRTBMessages to this class IMPORTANT: Coordinator objects are deleted by the controller and NOT by this class

 CoordinatorComposite (ClientCoordinator* clientCoordinator, ServerCoordinator* serverCoordinator)

CoordinatorComposite

[private]

 ~CoordinatorComposite ()
throw()

~CoordinatorComposite

[private]

destructor, does nothing by default

void  resetGame ()
throw (StrategyException,bad_exception)

resetGame

[private]

Reimplemented from Coordinator.

void  processReceivedRTBMessages ()
throw (StrategyException,bad_exception)

processReceivedRTBMessages

[private]

Reimplemented from Coordinator.

void  receiveRTBMessageRadar (double dist,object_type type,double angle)
throw (StrategyException, bad_exception)

receiveRTBMessageRadar

[private 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:
distThe distance of the observed object
typeThe type of the observed object
angleThe angle the observed object is seen at in rad, relative to the robot front

Reimplemented from Coordinator.

void  receiveRTBMessageInfo (double time,double speed,double cannonAngle)
throw (StrategyException, bad_exception)

receiveRTBMessageInfo

[private 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:
timeThe time that has elapsed since the game had started
speedThe velocity of the robot
cannonAngleThe angle the cannon points to

Reimplemented from Coordinator.

void  receiveRTBMessageCoordinates (double x,double y,double angle)
throw (StrategyException, bad_exception)

receiveRTBMessageCoordinates

[private 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:
xAnd ...
y... are the sent coordinates
angleis the angle the robot front points to

Reimplemented from Coordinator.

void  receiveRTBMessageRobotInfo (double energy,bool isTeamMate)
throw (StrategyException, bad_exception)

receiveRTBMessageRobotInfo

[private 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:
energyThe unexact energy level of the detected robot
isTeamMateDefines whether the robot is a team mate (team mode is not yet implemented in RTB)

Reimplemented from Coordinator.

void  receiveRTBMessageRotationReached (int what)
throw (StrategyException, bad_exception)

receiveRTBMessageRotationReached

[private 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

Reimplemented from Coordinator.

void  receiveRTBMessageEnergy (double energy)
throw (StrategyException, bad_exception)

receiveRTBMessageEnergy

[private 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:
energyThe unexact energy level

Reimplemented from Coordinator.

void  receiveRTBMessageRobotsLeft (int num)
throw ()

receiveRTBMessageRobotsLeft

[private 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:
numThe number of remaining robots

Reimplemented from Coordinator.

void  receiveRTBMessageCollision (object_type type,double angle)
throw (StrategyException, bad_exception)

receiveRTBMessageCollision

[private 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:
typeThe type of the hit object
angleThe angle the collision happened at in rad, relative to the robot front

Reimplemented from Coordinator.

void  receiveRTBMessageWarning (warning_type warning,const string& message)
throw (StrategyException, bad_exception)

receiveRTBMessageWarning

[private 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:
warningThe type of the warning
messageThe text of the warning

Reimplemented from Coordinator.

void  receiveRTBMessageDead ()
throw (StrategyException, bad_exception)

receiveRTBMessageDead

[private virtual]

This method is called when the RTB message "Dead" occurs. This message is sent when the robot pegs out.

Reimplemented from Coordinator.

ClientCoordinator* _clientCoordinator

_clientCoordinator

[private]

ServerCoordinator* _serverCoordinator

_serverCoordinator

[private]

string  getAssociatedRobotName ()
throw (bad_exception)

getAssociatedRobotName

[private]

Reimplemented from Coordinator.


Generated by: jonico on sc8-pr-shell1.sourceforge.net on Fri May 27 06:03:12 2005, using kdoc 2.0a54.