Commits

Anonymous committed 7a431d6

Add support for the row type.

  • Participants
  • Parent commits 5dd3224

Comments (0)

Files changed (2)

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

     {
         $clue_idx = 2 + $LEN + $get_index->();
     }
+    elsif ($type eq 'row')
+    {
+        $clue_idx = 2 + $get_index->();
+    }
     else
     {
         Carp::confess ("Unknown type $type.");

abc-path/Games-ABC_Path-Generator/t/riddle-obj.t

 use strict;
 use warnings;
 
-use Test::More tests => 9;
+use Test::More tests => 10;
 use Test::Differences;
 
 use Games::ABC_Path::Generator;
         'get_letters_of_clue type col',
     );
 
+    # TEST
+    eq_or_diff($riddle->get_letters_of_clue({ type => 'row', index => 3, }),
+        ['O', 'K',],
+        'get_letters_of_clue type col',
+    );
+
     my $layout = $riddle->get_final_layout();
 
     # TEST