Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[bin/crypt] nicer disk syntax

  • Loading branch information...
commit 2656ea529f4bc81473c67be1d16ccfadf98893b9 1 parent 7bd579c
Carl Mäsak authored July 23, 2012

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

  1. 18  bin/crypt
18  bin/crypt
@@ -1198,6 +1198,24 @@ multi MAIN() {
1198 1198
                 proceed;
1199 1199
             }
1200 1200
 
  1201
+            when /^ :s [move|put] [the]?
  1202
+                    $<disk>=[tiny||small||medium||large||huge]
  1203
+                    disk [on|to] [the]?
  1204
+                    $<target>=[left||middle||right]
  1205
+                    rod $/ {
  1206
+
  1207
+                $command = "move $<disk> $<target>";
  1208
+            }
  1209
+
  1210
+            when /^ :s [move|put] [the]?
  1211
+                    $<source>=[left||middle||right]
  1212
+                    disk [on|to] [the]?
  1213
+                    $<target>=[left||middle||right]
  1214
+                    rod $/ {
  1215
+
  1216
+                $command = "move $<source> $<target>";
  1217
+            }
  1218
+
1201 1219
             when /^ 'put' \h+ (\w+) \h+ ('in'|'on') \h+ (\w+) $/ {
1202 1220
                 $command = "put_thing_$1 $0 $2";
1203 1221
                 proceed;

0 notes on commit 2656ea5

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