diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-12-30 13:11:35 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-12-30 13:11:35 -0700 |
commit | f2ee67558acbe3c418a7558587b56158d593d88d (patch) | |
tree | d0b306fc26679fee672df740acdbdc0ede3c50dd /test.stage | |
parent | e112d781ea5ffc4186e7d70dba595b5a233335a8 (diff) | |
download | stage-f2ee67558acbe3c418a7558587b56158d593d88d.tar.gz stage-f2ee67558acbe3c418a7558587b56158d593d88d.tar.bz2 stage-f2ee67558acbe3c418a7558587b56158d593d88d.tar.xz stage-f2ee67558acbe3c418a7558587b56158d593d88d.zip |
return, exit, lists added. You can't index them.
They're linked lists right now, maybe that's not really what I want
long-term, but it'll work for now...
Diffstat (limited to '')
-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 |