class TeamInfo

Stores information about the whole team More...

Full nameGeneral::TeamInfo
Definition#include <teaminfo.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Private Members


Detailed Description

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:
namethe 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:
idthe 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:
idthe robot's id as received from registerRobotForRound(unsigned int)
posthe 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:
posthe position of the observed robot; see also function General::relativeToAbsolute()
toleranceSince 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:
idthe 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

_robots

[private]


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