Class TitledWorld
java.lang.Object
edu.uky.cs.nil.tt.world.World
edu.uky.cs.nil.tt.world.TitledWorld
A
story world that includes a name, title, and description.- Author:
- Stephen G. Ware
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTitledWorld(Database.WorldEntry entry) Constructs a titled world from its database entry.TitledWorld(String name, String title, String description, Collection<Entity> entities, Collection<Variable> variables, Collection<Action> actions, Collection<Ending> endings) Constructs a titled world from its name, title, description, and elements. -
Method Summary
Modifier and TypeMethodDescriptionReturns a human-readable natural language description of the object.getTitle()Returns a short human-readable natural language title for the object.Methods inherited from class World
contains, contains, contains, contains, getAction, getAction, getAction, getActions, getEnding, getEnding, getEnding, getEndings, getEntities, getEntity, getEntity, getName, getPlayer, getVariable, getVariable, getVariable, getVariables, requireAction, requireAction, requireAction, requireEnding, requireEnding, requireEnding, requireEntity, requireEntity, requireVariable, requireVariable, requireVariable, toString, validate, validate, validate, validate, validate
-
Field Details
-
title
The short natural language title of the world -
description
The longer natural language description of the world
-
-
Constructor Details
-
TitledWorld
public TitledWorld(String name, String title, String description, Collection<Entity> entities, Collection<Variable> variables, Collection<Action> actions, Collection<Ending> endings) Constructs a titled world from its name, title, description, and elements.- Parameters:
name- the unique system name for the worldtitle- the short natural language title of the worlddescription- the longer natural language description of the worldentities- a collection of objects that exist in the worldvariables- a collection of variables whose values can change and whose current values reflect the current state of the worldactions- a collection of ways the world state can changeendings- a collection of ways a story in this world can end
-
TitledWorld
Constructs a titled world from its database entry.- Parameters:
entry- the world's entry in the database
-
-
Method Details
-
getTitle
-
getDescription
Description copied from interface:DescribedReturns a human-readable natural language description of the object.- Specified by:
getDescriptionin interfaceDescribed- Returns:
- a human-readable natural language description of the object
-