Permalink
Browse files

[bin/crypt] 'east' -> 'walk east' abbreviation

  • Loading branch information...
1 parent 9a7f528 commit a9c83c02de04f9604e4eb7a5dead4e5c5e148b7d @masak committed Jul 6, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 bin/crypt
View
@@ -417,6 +417,12 @@ multi MAIN() {
}
my %commands = map { $^m.name => params($m) }, $game.^methods;
+ my @possible_directions = <
+ north south east west
+ northeast northwest southeast southwest
+ up down in out
+ >;
+
say "Clearing";
say "";
@@ -438,6 +444,11 @@ multi MAIN() {
say "[walk] north/south/east/west";
}
+ when any @possible_directions {
+ $command = "walk $command";
+ proceed;
+ }
+
my $verb = $command.words[0];
my @args = $command.words[1..*];
when %commands.exists($verb) {

0 comments on commit a9c83c0

Please sign in to comment.