|
|
Stores information about the whole team
TeamInfo ()
throw(bad_exception) | TeamInfo |
~TeamInfo ()
throw() | ~TeamInfo |
unsigned int registerRobotForRound (const string& name)
throw(bad_exception) | registerRobotForRound |
In each round each robot has to register at this object for new.
Parameters:
name | the name of the robot |
Returns: the robot's id in this round
void unregisterRobotForRound (unsigned int id)
throw(out_of_range,bad_exception) | unregisterRobotForRound |
This method has to be called by a robot when it is killed.
Parameters:
id | the robot's id as received from registerRobotForRound(unsigned int) |
void resetForNextRound ()
throw() | resetForNextRound |
Prepares the object for the next round
void setCoordinates (unsigned int id,const Position& pos)
throw(out_of_range,bad_exception) | setCoordinates |
Each turn every has to deliver his position using this method
Parameters:
id | the robot's id as received from registerRobotForRound(unsigned int) |
pos | the robot's position on the map |
unsigned int isFriend (const Position& pos,double tolerance=1.0)
throw() | isFriend |
[const]
` If a robot detects another robot, it can use this method to identify it as a teammate or enemy
Parameters:
pos | the position of the observed robot; see also function General::relativeToAbsolute() |
tolerance | Since this method identifies the robots using their coordinates, you need some tolerance range, however, you should hardly need to touch this. |
Returns: Zero if it is an enemy, otherwise the id of the observed team mate.
const RobotInfo& getFriendInfo (unsigned int id)
throw(out_of_range,bad_exception) | getFriendInfo |
[const]
Parameters:
id | the id of the requested team mate |
Returns: information about the requested team mate
unsigned int getTeamSize ()
throw() | getTeamSize |
[const]
Returns: the number of team mates that have registered yet
unsigned int _numTeam | _numTeam |
[private]
unsigned int _capacity | _capacity |
[private]
vector | _robots |
[private]
Generated by: jonico on sc8-pr-shell1.sourceforge.net on Fri May 27 06:03:12 2005, using kdoc 2.0a54. |