Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[bin/crypt] examining bushes also works

  • Loading branch information...
commit a2c7c9e5c574102eeabfae41b5c288b46aa188d4 1 parent bb4788a
Carl Mäsak authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 bin/crypt
15 bin/crypt
View
@@ -864,10 +864,13 @@ class Crypt::Game {
# Things on hill
.place_thing('grass', 'hill');
.make_thing_implicit('grass');
+ .place_thing('bushes', 'hill');
+ .make_thing_implicit('bushes');
.place_thing('door', 'hill');
.make_thing_openable('door');
.hide_thing('door');
.on_examine('grass', { $!engine.unhide_thing('door') });
+ .on_examine('bushes', { $!engine.unhide_thing('door') });
.place_player('clearing');
}
@@ -1857,6 +1860,18 @@ multi MAIN('test') {
'opening the door (-) without examining the grass';
}
+ {
+ my $game = Crypt::Game.new();
+
+ $game.walk('east');
+ $game.examine('bushes');
+ is $game.open('door'),
+ Adventure::PlayerOpened.new(
+ :thing<door>,
+ ),
+ 'opening the door (+) bushes work too';
+ }
+
done;
}
Please sign in to comment.
Something went wrong with that request. Please try again.