changeset 13:ba38424a14c2

Better output for the set-window effect/instruction.
author Atul Varma <varmaa@toolness.com>
date Sun, 11 May 2008 16:50:57 -0700
parents a0c7b17ae1c6
children 610e73303a71
files tests/output/test_gnusto_engine.txt tests/test_gnusto_engine.js
diffstat 2 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tests/output/test_gnusto_engine.txt	Sun May 11 15:52:18 2008 -0700
+++ b/tests/output/test_gnusto_engine.txt	Sun May 11 16:50:57 2008 -0700
@@ -26,26 +26,24 @@
 This is a small room with passages to the east and south and a forbidding hole leading west. Bloodstains and deep scratches (perhaps made by an axe) mar the walls.
 
 >
-[SW]
+[GNUSTO_EFFECT_SETWINDOW 1]
 [SC]
 [GNUSTO_EFFECT_STYLE 1 0 0]
 [SC]
 [SC]
 The Troll Room
 [GNUSTO_EFFECT_STYLE 0 0 0]
-[SW]
-responding with "quit"
-[GNUSTO_EFFECT_INPUT]
+[GNUSTO_EFFECT_SETWINDOW 0]
+[GNUSTO_EFFECT_INPUT] (responding with "quit")
 [TW]
 Are you sure you want to quit? 
-[SW]
+[GNUSTO_EFFECT_SETWINDOW 1]
 [SC]
 [GNUSTO_EFFECT_STYLE 1 0 0]
 [SC]
 [SC]
 The Troll Room
 [GNUSTO_EFFECT_STYLE 0 0 0]
-[SW]
-responding with "yes"
-[GNUSTO_EFFECT_INPUT]
+[GNUSTO_EFFECT_SETWINDOW 0]
+[GNUSTO_EFFECT_INPUT] (responding with "yes")
 [QU]
--- a/tests/test_gnusto_engine.js	Sun May 11 15:52:18 2008 -0700
+++ b/tests/test_gnusto_engine.js	Sun May 11 16:50:57 2008 -0700
@@ -17,10 +17,13 @@
         var responses = ['quit', 'yes'];
         var response = responses[gInputTimes];
         desc = '[GNUSTO_EFFECT_INPUT]';
-        print('responding with "' + response + '"');
+        desc += ' (responding with "' + response + '")';
         engine.answer(1, response);
         gInputTimes += 1;
         break;
+    case GNUSTO_EFFECT_SETWINDOW:
+        desc = ('[GNUSTO_EFFECT_SETWINDOW ' + engine.effect(1) + ']');
+        break;
     case GNUSTO_EFFECT_STYLE:
         desc = ('[GNUSTO_EFFECT_STYLE ' + engine.effect(1) +
                 ' ' + engine.effect(2) + ' ' + engine.effect(3) + ']');