Class Turn
java.lang.Object
edu.uky.cs.nil.tt.world.Turn
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCode()Returns a string of1's and0's that uniquely represents this object among other objects of the same type in the same story world.Returns a human-readable natural language description of the object.setDescription(String description) Returns a new turn that is the same as this turn, except this itsdescriptionis the given value.toString()
-
Field Details
-
role
The role of the participant taking this turn -
type
The kind of turn being taken -
action
The action that this turn is relevant to
-
-
Constructor Details
-
Turn
Constructs a turn and automatically computes itscode.- Parameters:
role- the role of the participant taking this turntype- the kind of turn being takenaction- the action relevant to this turndescription- a natural language description of this turn
-
Turn
-
Turn
-
-
Method Details
-
toString
-
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
-
setDescription
Returns a new turn that is the same as this turn, except this itsdescriptionis the given value.- Parameters:
description- the description the new turn should have- Returns:
- a turn identical to this turn, except with the given description
-
getCode
Description copied from interface:EncodedReturns a string of1's and0's that uniquely represents this object among other objects of the same type in the same story world. Every encoded object of the same type should return a string of the same length, even if it must be padded with0's.
-