Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[bin/crypt] examining bushes also works

  • Loading branch information...
commit a2c7c9e5c574102eeabfae41b5c288b46aa188d4 1 parent bb4788a
Carl Mäsak authored July 18, 2012

Showing 1 changed file with 15 additions and 0 deletions. Show diff stats Hide diff stats

  1. 15  bin/crypt
15  bin/crypt
@@ -864,10 +864,13 @@ class Crypt::Game {
864 864
             # Things on hill
865 865
             .place_thing('grass', 'hill');
866 866
             .make_thing_implicit('grass');
  867
+            .place_thing('bushes', 'hill');
  868
+            .make_thing_implicit('bushes');
867 869
             .place_thing('door', 'hill');
868 870
             .make_thing_openable('door');
869 871
             .hide_thing('door');
870 872
             .on_examine('grass', { $!engine.unhide_thing('door') });
  873
+            .on_examine('bushes', { $!engine.unhide_thing('door') });
871 874
 
872 875
             .place_player('clearing');
873 876
         }
@@ -1857,6 +1860,18 @@ multi MAIN('test') {
1857 1860
             'opening the door (-) without examining the grass';
1858 1861
     }
1859 1862
 
  1863
+    {
  1864
+        my $game = Crypt::Game.new();
  1865
+
  1866
+        $game.walk('east');
  1867
+        $game.examine('bushes');
  1868
+        is $game.open('door'),
  1869
+            Adventure::PlayerOpened.new(
  1870
+                :thing<door>,
  1871
+            ),
  1872
+            'opening the door (+) bushes work too';
  1873
+    }
  1874
+
1860 1875
     done;
1861 1876
 }
1862 1877
 

0 notes on commit a2c7c9e

Please sign in to comment.
Something went wrong with that request. Please try again.