vitro
Class TextAgent<A extends Actor>

java.lang.Object
  extended by 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.


Constructor Summary
TextAgent()
           
 
Method Summary
 Action choose(A actor, Set<Action> options)
          Select an action from the available options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextAgent

public TextAgent()
Method Detail

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.