Class AssetBuilder
java.lang.Object
edu.uky.cs.nil.tt.world.AssetBuilder
A tool for defining the
assets used in a story
world. Assets can be defined using this object's various add
methods, and then this object can be passed to World's constructor to define the name and assets
the world will have.
Note that this object does not check the correctness of the defined assets. For example, it is possible to define multiple assets of the same type with the same name. An exception will be thrown when constructing the World object, which checks the correctness of all asset definitions.
- Author:
- Stephen G. Ware
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AssetBuilder
public AssetBuilder()Constructs an empty asset builder.
-
-
Method Details
-
setName
Constructs a new asset builder with a given world name.- Parameters:
name- the name the world containing these assets will have
-
addEntity
-
addVariable
Defines a newvariable.- Parameters:
signature- the unique signature of the variableencoding- the name of theencoding typeof the variabledescription- a natural language description of the variable- Returns:
- a variable object with those properties
-
addAction
Defines a newaction.- Parameters:
signature- the unique signature of the actionconsenting- the characters in the story world who need a reason to take the actiondescription- a natural language description of the action- Returns:
- an action object with those properties
-
addEnding
-