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.ttModifier and TypeClassDescriptionenumRepresents the two roles in a collaborative storytellingsession: 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 RoleModifier and TypeFieldDescriptionfinal RoleSession.Report.roleThe role who sent this reportfinal RoleSession.Result.roleThe role who caused the endingMethods in edu.uky.cs.nil.tt that return RoleModifier and TypeMethodDescriptionRole.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 RoleReturns 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 RoleModifier and TypeMethodDescriptionprotected voidAdds 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 voidThis method is called once when the client's session starts.protected voidSets the role this client wants to play in its session.Constructors in edu.uky.cs.nil.tt with parameters of type RoleModifierConstructorDescriptionConstructs 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.Constructs a client with the given session preferences, reading the password and API key from the environment, and using the default network settings.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 RoleModifier and TypeFieldDescriptionfinal RoleJoin.roleThe role this new agent wants to have in their session, or null if they are willing to play either rolefinal RoleStart.roleThe role the recipient of this message will have in the sessionfinal RoleStop.roleThe participant who ended the session, or null if the session reached a pre-defined ending or was ended by the serverConstructors in edu.uky.cs.nil.tt.io with parameters of type RoleModifierConstructorDescriptionConstructs a new join message with an agent's credentials and preferences.Constructs a new start message with the given story world the session will take place in.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 RoleModifier and TypeFieldDescriptionfinal RoleStatus.roleThe role of the participant to whom this status is being describedfinal RoleTurn.roleThe role of the participant taking this turnMethods in edu.uky.cs.nil.tt.world that return RoleModifier and TypeMethodDescriptionprotected static final RoleDetermines whose turn it is based on the history of a session.Methods in edu.uky.cs.nil.tt.world with parameters of type RoleModifier and TypeMethodDescriptionbooleanReturns true if the given story role controls one or more of theconsenting charactersfor 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 EndingDetermines whether the story has ended and, if so, returns the ending.protected StringLogicalWorld.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 entitiesvisibleto a given role which haveuseful descriptions.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 StatusCalculates the ending (if any), entity descriptions, and turns available to include in a status.booleanLogicalWorld.isAvailable(Role role, Action action, State state) Checks whether the given action is available is available to the given role in the given state.booleanChecks whether the given action would be seen by the given role if it happened in the given state.booleanChecks whether the given role can see the given entity in the given state.booleanChecks whether the given role can see the value of the given variable in the given state.Returns a new rule identical to this one, except thatDescriber.Key.ROLEmust have the given value.abstract StatusReturns the initial state of the story world for a given role as a status object.Returns a new rule identical to this one, except thatDescriber.Key.TOmust have the given value.Constructors in edu.uky.cs.nil.tt.world with parameters of type RoleModifierConstructorDescriptionStatus(String world, Role role, Turn[] history, State state, Ending ending, Entity[] descriptions, Turn[] choices) Constructs a status.Constructs a turn with no description and automatically computes itscode.Constructs a turn and automatically computes itscode.Constructs apassturn for a given story world.