RCRPG/Raku: Difference between revisions
m
→{{header|Perl 6}}: GLR updates, edited works with
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: a few minor tweaks and bug fixs) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: GLR updates, edited works with) |
||
Line 23:
As with the [[RCRPG/Perl|Perl version]].
==Code==
{{works with|
<lang perl6>my %commands;
my %rooms;
Line 41 ⟶ 40:
up => 'in the ceiling',
down => 'in the floor',
(map { ($_ => "to the $_") }, <north south east west>).Slip;
my %dir_vec =
Line 51 ⟶ 50:
west => [-1, 0, 0];
my %dir_rev = map { ($^a => $^b
< north south east west up down >;
Line 117 ⟶ 116:
}
for flat <north south east west up down> -> $dir {
command [$dir, substr($dir,0,1)], '', 0, { move($dir) };
}
|