Testclass
A Test object can be used to create a series of testing commands in your game, for example:
Test ‘foo’ [‘x me’, ‘i’, ‘wear uniform’] [uniform];
Would cause the uniform to be moved into the player character’s inventory and then the commands X ME and then I and WEAR UNIFORM to be executed in response to TEST FOO.
class
Test
: object
Superclass Tree (in declaration order)
Test
` object`
Subclass Tree
(none)
Global Objects
(none)
Summary of Properties
location
reportHolding
reportMove
testHolding
testList
testName
Summary of Methods
Properties
location
The location to move the player character to before running the test script
reportHolding
Flag: do we want to report on what items were added to inventory? By default we do.
reportMove
Flag: Do we want to report any change of location by looking around in the new one? By default we will.
testHolding
The objects to move into the player character’s inventory before running the test script.
testList
The list commands to be executed when running this test.
testName
The name of this test
Methods
getHolding ( )
Move everything in the testHolding list into the actor’s inventory
run ( )
Run this test by passing the commands in testList through Parser.parse().
Adv3Lite Library Reference Manual
Generated on 15/03/2023 from adv3Lite version 1.6.1