We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10cffde commit 8378b27Copy full SHA for 8378b27
bin/maze
@@ -25,7 +25,7 @@ my (@maze, @walk);
25
## Parse maze type options.
26
27
sub usage {
28
- die "$0 usage: $0 [-fl|-fi|-df|-sf] [width height]\n"
+ die "usage: $0 [-fl|-fi|-df|-sf] [width height]\n"
29
}
30
31
sub traverse_by_depth { -1 } # normal mazes (long walks)
@@ -75,10 +75,7 @@ my $test_height = $height - 1;
75
76
#
77
## initialize the maze
78
-
79
-for (my $y=0; $y<$height; $y++) {
80
- push @maze, [ (0) x $width ];
81
-}
+@maze = map { [ (0) x $width ] } (1 .. $height);
82
83
my $in = int(rand($width));
84
push @walk, [0, $in];
0 commit comments