| Trees | Index | Help |
|
|---|
| Package svs_demogame :: Module agents :: Class AgentGroupManager |
|
Manages membership of agent groups.
Agents can join groups which allow them to behave collectively. Each group is defined by a unique name and colour.| Method Summary | |
|---|---|
__init__(self)
| |
Adds new group to manager. | |
Returns group with specified name, if not present retruns None. | |
Adds agent to specified group. | |
| Method Details |
|---|
addAgentGroup(self, groupName, groupColour)Adds new group to manager. A group can only be added once, if a group with the same name or colour already exists, the new group is rejected. |
getGroup(self, groupName)Returns group with specified name, if not present retruns None. |
joinAgentGroup(self, agent, groupName)Adds agent to specified group. Checks that the agent does not alreday belong to the group, if so ignores request. If group does not exist raisesAgentGroupManagerException.
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 20 15:30:29 2005 | http://epydoc.sf.net |