vitro
Class TextAgent<A extends Actor>
java.lang.Object
vitro.TextAgent<A>
- All Implemented Interfaces:
- Agent<A>
public class TextAgent<A extends Actor>
- extends Object
- implements Agent<A>
A generic Agent implementation which
prompts a user via stdio to select from
available Actions.
Frequently useful for debugging.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextAgent
public TextAgent()
choose
public Action choose(A actor,
Set<Action> options)
- Description copied from interface:
Agent
- Select an action from the available options.
- Specified by:
choose
in interface Agent<A extends Actor>
- Parameters:
actor
- the Actor for whom a decision is being made.options
- the available Actions for the Actor.
- Returns:
- the Action this Actor will take.