diff options
Diffstat (limited to 'test.stage')
-rw-r--r-- | test.stage | 37 |
1 files changed, 23 insertions, 14 deletions
@@ -11,6 +11,17 @@ global | |||
11 | { | 11 | { |
12 | display(object); | 12 | display(object); |
13 | } | 13 | } |
14 | // You should always have a global exit, quit, escape, something for | ||
15 | // dev-testing at least. | ||
16 | command: "exit" | ||
17 | { | ||
18 | exit(); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | function square( x ) | ||
23 | { | ||
24 | return( x*x ); | ||
14 | } | 25 | } |
15 | 26 | ||
16 | function sillyDisplay( txt, extra ) | 27 | function sillyDisplay( txt, extra ) |
@@ -39,22 +50,20 @@ function getThing() | |||
39 | 50 | ||
40 | situation <<start>> | 51 | situation <<start>> |
41 | { | 52 | { |
42 | setup | 53 | command: "go" "home" |
43 | { | 54 | { |
44 | situation.thing = 55; | 55 | display("Home would be nice..."); |
45 | player.name = "Bob"; | 56 | } |
46 | name = player.name + "o"; | ||
47 | name += " The Man"; | ||
48 | display("This is the setup phase for start, " + name); | ||
49 | sillyDisplay( "Hello", name == player.name ); | ||
50 | |||
51 | display( exists(name) ); | ||
52 | delete( name ); | ||
53 | display( exists(name) ); | ||
54 | 57 | ||
55 | getThing(); | 58 | command: "go" elsewhere |
56 | myGoto( <<stuff>> ); | 59 | { |
57 | display("You shouldn't see this."); | 60 | display("You don't know how to go " + elsewhere ); |
61 | } | ||
62 | setup | ||
63 | { | ||
64 | stuff = [5, 10, "bob"]; | ||
65 | display( stuff ); | ||
66 | exit(); | ||
58 | } | 67 | } |
59 | 68 | ||
60 | enter | 69 | enter |