LogicalVerifyResultclass

verify.t[170]

Superclass
Tree

Subclass
Tree

Global
Objects

Property
Summary

Method
Summary

Property
Details

Method
Details

Verification result - command is logical and allowed.

This can provide additional information ranking the likelihood of the command intepretation, which can be useful to distinguish among logical but not equally likely possibilities. For example, if the command is “take book,” and the actor has a book inside his or her backpack, and there is also a book on a table in the actor’s location, it would make sense to take either book, but the game might prefer to take the book on the table because it’s not already being carried. The likelihood level can be used to rank these alternatives: if the object is being carried indirectly, a lower likelihood ranking would be returned than if the object were not already somewhere in the actor’s inventory.

class LogicalVerifyResult :   VerifyResult

Superclass Tree   (in declaration order)

LogicalVerifyResult
VerifyResult
MessageResult
`                         object`

Subclass Tree  

(none)

Global Objects  

defaultLogicalVerifyResult

Summary of Properties  

keyVal likelihood listOrder resultRank

Inherited from VerifyResult :
allowAction excludePluralMatches

Inherited from MessageResult :
messageProp_ messageText_

Summary of Methods  

compareTo construct identicalTo isWorseThan shouldInsertBefore

Inherited from MessageResult :
resolveMessageText setMessage showMessage

Properties  

keyVal

verify.t[281]

my key value, to distinguish among different results with the same likelihood ranking

likelihood

verify.t[249]

The likelihood of the command - the higher the number, the more likely. We use 100 as the default, so that there’s plenty of room for specific rankings above or below the default. Particular actions might want to rank likelihoods based on action-specific factors.

listOrder

verify.t[275]

Our list ordering. This establishes how we are entered into the master results list relative to other ‘logical’ results. Results are entered into the master list in ascending list order, so a lower order number means an earlier place in the list.

The list ordering is more important than the likelihood ranking. Suppose we have two items: one is at list order 10 and has likelihood 100, and the other is at list order 20 and has likelihood 50. The order of the likelihoods stored in the list will be (100, 50). This is inverted from the normal ordering, which would put the worst item first.

The point of this ordering is to allow for logical results with higher or lower importances in establishing the likelihood. The library uses the following list order values:

100 - the default ranking. This is used in most cases.

150 - secondary ranking. This is used for rankings that aren’t of great importance but which can be useful to distinguish objects in cases where no more important rankings are present. The library uses this for precondition verification rankings.

resultRankOVERRIDDEN

verify.t[284]

result rank - we’re the most approving kind of result

Methods  

compareTo (other)OVERRIDDEN

verify.t[198]

compare to another result

construct (likelihoodRank, key, ord)OVERRIDDEN

verify.t[171]

no description available

identicalTo (other)OVERRIDDEN

verify.t[233]

determine if I’m identical to another result

isWorseThan (other)OVERRIDDEN

verify.t[184]

am I worse than the other result?

shouldInsertBefore (other)OVERRIDDEN

verify.t[215]

determine if I go in a result list before the given result

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3