org.vizzini.game
Interface ITeam

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractTeam, DefaultTeam

public interface ITeam
extends Serializable

Defines methods required by teams in the game framework. A team instance represents one team of agents. Examples include the teams White and Black in chess, or partners in bridge. Teams may also have associated tokens.

Since:
v0.1
Version:
v0.2
Author:
Jeffrey M. Thompson

Field Summary
static String NAME_PROPERTY
          Name property name.
 
Method Summary
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Add a PropertyChangeListener for a specific property.
 void configure(Properties properties, int index)
          Configure this team.
 IAgentCollection getAgentCollection()
          Return the agent collection.
 String getName()
          Return this team's name.
 ITokenCollection getTokenCollection()
          Return the token collection.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Remove a PropertyChangeListener for a specific property.
 void reset()
          Reset to the initial state.
 void setName(String name)
          Set the name to the given value.
 

Field Detail

NAME_PROPERTY

static final String NAME_PROPERTY
Name property name.

See Also:
Constant Field Values
Method Detail

getAgentCollection

IAgentCollection getAgentCollection()
Return the agent collection.

Since:
v0.1

setName

void setName(String name)
Set the name to the given value.

Parameters:
name - The new name.
Since:
v0.1

getName

String getName()
Return this team's name.

Since:
v0.1

getTokenCollection

ITokenCollection getTokenCollection()
Return the token collection.

Since:
v0.1

addPropertyChangeListener

void addPropertyChangeListener(String propertyName,
                               PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property.

Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added.
Since:
v0.2

configure

void configure(Properties properties,
               int index)
               throws InstantiationException,
                      IllegalAccessException
Configure this team.

Parameters:
properties - Source of configuration information.
index - Index of this team's properties.
Throws:
InstantiationException
IllegalAccessException
Since:
v0.1

removePropertyChangeListener

void removePropertyChangeListener(String propertyName,
                                  PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.

Parameters:
propertyName - The name of the property that was listened on.
listener - The PropertyChangeListener to be removed.
Since:
v0.2

reset

void reset()
Reset to the initial state.

Since:
v0.1


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02