Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit a9c83c02de04f9604e4eb7a5dead4e5c5e148b7d 1 parent 9a7f528
Carl Mäsak authored July 06, 2012

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

  1. 11  bin/crypt
11  bin/crypt
@@ -417,6 +417,12 @@ multi MAIN() {
417 417
     }
418 418
     my %commands = map { $^m.name => params($m) }, $game.^methods;
419 419
 
  420
+    my @possible_directions = <
  421
+        north south east west
  422
+        northeast northwest southeast southwest
  423
+        up down in out
  424
+    >;
  425
+
420 426
     say "Clearing";
421 427
     say "";
422 428
 
@@ -438,6 +444,11 @@ multi MAIN() {
438 444
                 say "[walk] north/south/east/west";
439 445
             }
440 446
 
  447
+            when any @possible_directions {
  448
+                $command = "walk $command";
  449
+                proceed;
  450
+            }
  451
+
441 452
             my $verb = $command.words[0];
442 453
             my @args = $command.words[1..*];
443 454
             when %commands.exists($verb) {

0 notes on commit a9c83c0

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