Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make number of exits and rows options

  • Loading branch information...
commit 2aeb0ac3a878cf997d142d40e994526d1477070b 1 parent 85243a4
@jtpalmer authored
Showing with 14 additions and 2 deletions.
  1. +14 −2 week4/electriclines.pm
View
16 week4/electriclines.pm
@@ -1,8 +1,20 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use 5.010;
+use Getopt::Long;
use FindBin qw( $Bin );
use lib "$Bin/lib";
use Games::ElectricLines;
-Games::ElectricLines->new()->run();
+
+my $lines = 4;
+my $exits = 1;
+my $result = GetOptions(
+ 'lines=i' => \$lines,
+ 'exits=i' => \$exits,
+);
+die "See README for usage\n" unless $result;
+
+Games::ElectricLines->new(
+ _row_count => $lines,
+ _exit_count => $exits,
+)->run();
Please sign in to comment.
Something went wrong with that request. Please try again.