Commits

shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b  committed a8e3da2

Add a customisable seed.

  • Participants
  • Parent commits f5dde3c

Comments (0)

Files changed (1)

File abc-path/generator/generate-abs-path.pl

 use strict;
 use warnings;
 
-use Data::Dumper;
+use Getopt::Long;
 
-my $gen = Games::ABC_Path::Generator->new({ seed => 24 });
+my $seed = 24;
+
+if (!GetOptions(
+        'seed=i' => \$seed,
+    ))
+{
+    die "Could not get options for program!";
+}
+
+my $gen = Games::ABC_Path::Generator->new({ seed => $seed, });
 
 print $gen->get_layout_as_string($gen->generate());