Uses of Enum Class
edu.uky.cs.nil.tt.Role

Packages that use Role
Package
Description
Tandem Tales is a platform that enables short, paired storytelling exercises between two agents over a network.
The IO (input/output) package defines the various message types that can be sent between a server and client and provide some utilities for serializing and deserializing objects as JSON.
Story worlds define the objects, concepts, and actions that exist in a story, and story world models define the logic for when actions can happen, how actions change the current state of world, when endings happen, etc.
  • Uses of Role in edu.uky.cs.nil.tt

    Subclasses with type arguments of type Role in edu.uky.cs.nil.tt
    Modifier and Type
    Class
    Description
    enum 
    Represents the two roles in a collaborative storytelling session: the Player, who typically controls a single character, and the Game Master, who controls all other characters and the environment.
    Fields in edu.uky.cs.nil.tt declared as Role
    Modifier and Type
    Field
    Description
    final Role
    Session.Report.role
    The role who sent this report
    final Role
    Session.Result.role
    The role who caused the ending
    Methods in edu.uky.cs.nil.tt that return Role
    Modifier and Type
    Method
    Description
    Role.getPartner()
    Returns the partner of this role.
    Agent.getRole()
    Returns the role this agent is playing in its session, or null if the agent has not yet been matched.
    Client.getRole()
    Returns the role this client wants to play or is currently playing in its session.
    static Role
    Role.valueOf(String name)
    Returns the enum constant of this class with the specified name.
    static Role[]
    Role.values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Methods in edu.uky.cs.nil.tt with parameters of type Role
    Modifier and Type
    Method
    Description
    protected void
    Session.append(Role role, Report report)
    Adds a new report to this session, which records a response by one of the participants to a rating or survey question about the story.
    protected void
    Client.onStart(World world, Role role, State initial)
    This method is called once when the client's session starts.
    protected void
    Client.setRole(Role role)
    Sets the role this client wants to play in its session.
    Constructors in edu.uky.cs.nil.tt with parameters of type Role
    Modifier
    Constructor
    Description
     
    Client(String name, String world, Role role)
    Constructs a client with a name, role, and world name, which has no preference for a partner, reading the password and API key from the environment, and using the default network settings.
     
    Client(String name, String world, Role role, String partner)
    Constructs a client with the given session preferences, reading the password and API key from the environment, and using the default network settings.
     
    Client(String name, String world, Role role, String partner, String url, int port)
    Constructs a client with the given session preferences and network details, reading the password and API key from the environment.
     
    Client(String name, String password, String world, Role role, String partner, String key, String url, int port)
    Constructs a client with the given session preferences, password, API key, and network details.
  • Uses of Role in edu.uky.cs.nil.tt.io

    Fields in edu.uky.cs.nil.tt.io declared as Role
    Modifier and Type
    Field
    Description
    final Role
    Join.role
    The role this new agent wants to have in their session, or null if they are willing to play either role
    final Role
    Start.role
    The role the recipient of this message will have in the session
    final Role
    Stop.role
    The participant who ended the session, or null if the session reached a pre-defined ending or was ended by the server
    Constructors in edu.uky.cs.nil.tt.io with parameters of type Role
    Modifier
    Constructor
    Description
     
    Join(String name, String password, String world, Role role, String partner)
    Constructs a new join message with an agent's credentials and preferences.
     
    Start(World world, Role role)
    Constructs a new start message with the given story world the session will take place in.
     
    Stop(Role role)
    Constructs a stop message for the role who stopped the session before it reached a pre-defined ending.
  • Uses of Role in edu.uky.cs.nil.tt.world

    Fields in edu.uky.cs.nil.tt.world declared as Role
    Modifier and Type
    Field
    Description
    final Role
    Status.role
    The role of the participant to whom this status is being described
    final Role
    Turn.role
    The role of the participant taking this turn
    Methods in edu.uky.cs.nil.tt.world that return Role
    Modifier and Type
    Method
    Description
    protected static final Role
    LogicalWorld.current(Turn[] history)
    Determines whose turn it is based on the history of a session.
    Methods in edu.uky.cs.nil.tt.world with parameters of type Role
    Modifier and Type
    Method
    Description
    boolean
    Action.consents(Role role)
    Returns true if the given story role controls one or more of the consenting characters for this action.
    protected Turn[]
    LogicalWorld.getChoices(Role role, Turn[] history, State state, Ending ending)
    Returns an array of choices available to a given role based on the current state of a story world, or null if no choices are available.
    LogicalWorld.getDescription(Object object, Role to)
    Returns a phrase or sentence to describe an object to the given role using this world models' describer.
    protected Ending
    LogicalWorld.getEnding(Role role, Turn[] history, State state)
    Determines whether the story has ended and, if so, returns the ending.
    protected String
    LogicalWorld.getEntityDescription(Role role, Turn[] history, State state, Entity entity)
    Returns a longer, more helpful description of an entity based on the current state of a story world.
    protected Entity[]
    LogicalWorld.getEntityDescriptions(Role role, Turn[] history, State state)
    Returns an array of entities visible to a given role which have useful descriptions.
    Describer.getPhrase(Object object, Role to)
    Applies this describer's rules to generate a natural language description of the given object for a given role.
    Describer.getSentence(Object object, Role to)
    Applies this describer's rules to generate a natural language description of the given object for a given role, with the first letter capitalized and ending in a period.
    protected Status
    LogicalWorld.getStatus(Role role, Turn[] history, State actual, State observed)
    Calculates the ending (if any), entity descriptions, and turns available to include in a status.
    boolean
    LogicalWorld.isAvailable(Role role, Action action, State state)
    Checks whether the given action is available is available to the given role in the given state.
    boolean
    LogicalWorld.isVisible(Role role, Action action, State state)
    Checks whether the given action would be seen by the given role if it happened in the given state.
    boolean
    LogicalWorld.isVisible(Role role, Entity entity, State state)
    Checks whether the given role can see the given entity in the given state.
    boolean
    LogicalWorld.isVisible(Role role, Variable variable, State state)
    Checks whether the given role can see the value of the given variable in the given state.
    Describer.Rule.roleIs(Role role)
    Returns a new rule identical to this one, except that Describer.Key.ROLE must have the given value.
    LogicalWorld.start(Role role)
     
    abstract Status
    WorldModel.start(Role role)
    Returns the initial state of the story world for a given role as a status object.
    Describer.Rule.to(Role role)
    Returns a new rule identical to this one, except that Describer.Key.TO must have the given value.
    Constructors in edu.uky.cs.nil.tt.world with parameters of type Role
    Modifier
    Constructor
    Description
     
    Status(String world, Role role, Turn[] history, State state, Ending ending, Entity[] descriptions, Turn[] choices)
    Constructs a status.
     
    Turn(Role role, Turn.Type type, Action action)
    Constructs a turn with no description and automatically computes its code.
     
    Turn(Role role, Turn.Type type, Action action, String description)
    Constructs a turn and automatically computes its code.
     
    Turn(Role role, World world)
    Constructs a pass turn for a given story world.