game.title = "Demo game"; game.author = "Mike Buland"; game.version = 1; game.revision = 0; game.start = <>; global { command: "eat" object { display(object); } } function sillyDisplay( txt, extra ) { display("!~! " + txt + " !~!"); if extra then { display("And then some extra!"); } else { display("...no extra for you"); } } function myGoto( txt ) { display( txt ); goto( txt ); } function getThing() { display( situation.thing ); } situation <> { setup { situation.thing = 55; player.name = "Bob"; name = player.name + "o"; name += " The Man"; display("This is the setup phase for start, " + name); sillyDisplay( "Hello", name == player.name ); display( exists(name) ); delete( name ); display( exists(name) ); getThing(); myGoto( <> ); display("You shouldn't see this."); } enter { display('''This is the enter part of the start situation'''); } } situation <> { command: "eat" object { display("You can't eat " + object ); } command: "eat" object "now" { display("Alright, fine, eat " + object + " now..." ); } setup { situation.thing = "Just a thing"; } enter { getThing(); display('''Entered stuff''' + player.name); count = 0; while count < 5 do { display('thing to count!'); count += 1; } } }