Class Status
java.lang.Object
edu.uky.cs.nil.tt.world.Status
A status contains the full history of a
session in a story world, a description of its current state, and a list of turns that can be taken next (if
any).- Author:
- Stephen G. Ware
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the ending the session's story has reached, or null if the story has not yet ended.Returns an unmodifiable list of all turns that have happened so far in the session.getState()Returns a state that gives the current value of all the story world'svariables.toString()
-
Field Details
-
role
The role of the participant to whom this status is being described
-
-
Constructor Details
-
Status
public Status(String world, Role role, Turn[] history, State state, Ending ending, Entity[] descriptions, Turn[] choices) Constructs a status.- Parameters:
world- the name of the story world being used in this sessionrole- the role to whom this status is being sent and for whom the descriptions are being generatedhistory- all turns that have happened so far in the sessionstate- the current value of all of the story world's variablesending- the ending this session's story has reached, or null if no ending has been reacheddescriptions- the entities that are currently visible to the rolechoices- the turns this role can take next (which may be none)
-
-
Method Details
-
toString
-
getHistory
-
getState
-
getEnding
Returns the ending the session's story has reached, or null if the story has not yet ended.- Returns:
- the story's ending, or null if it has not ended
-
getDescriptions
Returns an unmodifiable list of all theentitiesthatthis rolecan current see. Each one will have anatural language descriptionthat gives some helpful context about it. Note that not all entities in the story world will be in this list; if an entity cannot be seen it is excluded.- Returns:
- a list of all visible entities and their descriptions
-
getChoices
-