public abstract class IAGOCoreVH extends GeneralVH
safeForMultiAgent
game
Constructor and Description |
---|
IAGOCoreVH(java.lang.String name,
GameSpec game,
javax.websocket.Session session,
IAGOCoreBehavior behavior,
IAGOCoreExpression expression,
IAGOCoreMessage messages)
Constructor for most VHs used by IAGO.
|
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
getArtName()
Every agent needs a name to select the art that will be used.
|
java.util.LinkedList<Event> |
getEventResponse(Event e)
Agents work by responding to various events.
|
protected int |
getGameCount()
Returns a simple int representing the current game count.
|
protected int |
getLedger()
Returns a simple int representing the internal "ledger" of favors done for the agent.
|
protected int |
getTotalLedger()
Returns a simple int representing the internal "ledger" of favors done for the agent, including all pending values.
|
protected int |
getVerbalLedger()
Returns a simple int representing the potential "ledger" of favors verbally agreed to.
|
protected void |
modifyOfferLedger(int increment)
Allows you to modify the agent's internal "ledger" of offer favors proposed.
|
protected void |
modifyVerbalLedger(int increment)
Allows you to modify the agent's internal "ledger" of verbal favors done for it.
|
agentDescription, getAgentVsAgent, getID, safeForMultiAgent, setAgentVsAgent
getAdversary, getHistory, getName, getSession, pairWith, setAdversary, setGameSpec, setHistory
public IAGOCoreVH(java.lang.String name, GameSpec game, javax.websocket.Session session, IAGOCoreBehavior behavior, IAGOCoreExpression expression, IAGOCoreMessage messages)
name
- name of the agent. NOTE: Please give your agent a unique name. Do not copy from the default names, such as "Pinocchio,"
or use the name of one of the character models. An agent's name and getArtName do not need to match.game
- the GameSpec that the agent plays in first.session
- the web session that the agent will be active in.behavior
- Every core agent needs a behavior extending CoreBehavior.expression
- Every core agent needs an expression extending CoreExpression.messages
- Every core agent needs a message extending CoreMessage.protected int getLedger()
protected int getTotalLedger()
protected int getVerbalLedger()
protected void modifyVerbalLedger(int increment)
increment
- value (negative ok)protected void modifyOfferLedger(int increment)
increment
- value (negative ok)protected int getGameCount()
public java.util.LinkedList<Event> getEventResponse(Event e)
getEventResponse
in class GeneralVH
e
- the Event that the agent will respond to.public abstract java.lang.String getArtName()
getArtName
in class GeneralVH