Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[bin/crypt] player actually moves when walking

:)
  • Loading branch information...
commit 4d8064f7a7bc76861c94f4e44128abd9cb26dcd4 1 parent df5be0e
@masak authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 bin/crypt
View
13 bin/crypt
@@ -292,6 +292,9 @@ class Adventure::Engine {
my $direction = .direction;
%!exits{$room1}{$direction} = $room2;
}
+ when Adventure::PlayerWalked {
+ $!player_location = .to;
+ }
}
}
@@ -570,6 +573,16 @@ multi MAIN('test') {
};
}
+ {
+ my $game = Crypt::Game.new();
+
+ $game.walk('east');
+ throws_exception
+ { $game.walk('east') },
+ X::Adventure::NoExitThere,
+ 'the player actually moves to the next room';
+ }
+
done;
}
Please sign in to comment.
Something went wrong with that request. Please try again.