Commits

shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b  committed 09d55f5

Got rid of ::Generator->get_riddle_as_string().

  • Participants
  • Parent commits 8d5c801

Comments (0)

Files changed (2)

File abc-path/Games-ABC_Path-Generator/lib/Games/ABC_Path/Generator.pm

     }
 }
 
-=head2 $gen->get_riddle_as_string($riddle)
-
-For internal use.
-
-=cut
-
-sub get_riddle_as_string
-{
-    my ($self,$riddle) = @_;
-
-    my $layout_string = $riddle->get_final_layout_as_string({});
-    
-    my $riddle_string = $riddle->get_riddle_v1_string;
-
-    return sprintf(
-        "ABC Path Solver Layout Version 1:\n%s\nSolution:\n%s",
-        $riddle_string, $layout_string,
-    );
-}
-
 =head1 AUTHOR
 
 Shlomi Fish, C<< <shlomif at cpan.org> >>

File abc-path/Games-ABC_Path-Generator/scripts/abc-path-gen

 }
 elsif ($mode eq 'riddle')
 {
-    print $gen->get_riddle_as_string($gen->calc_riddle());
+    my $riddle = $gen->calc_riddle();
+
+    my $layout_string = $riddle->get_final_layout_as_string({});
+    
+    my $riddle_string = $riddle->get_riddle_v1_string;
+
+    print sprintf(
+        "ABC Path Solver Layout Version 1:\n%s\nSolution:\n%s",
+        $riddle_string, $layout_string,
+    );
 }