1. Shlomi Fish
  2. abc-path

Commits

shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b  committed 193eaf5

get_letters_of_clue type antidiag.

  • Participants
  • Parent commits c1009b6
  • Branches default

Comments (0)

Files changed (2)

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

View file
  • Ignore whitespace
     {
         $clue_idx = 0;
     }
+    elsif ($type eq 'antidiag')
+    {
+        $clue_idx = 1;
+    }
     else
     {
         Carp::confess ("Unknown type $type.");

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

View file
  • Ignore whitespace
 use strict;
 use warnings;
 
-use Test::More tests => 11;
+use Test::More tests => 12;
 use Test::Differences;
 
 use Games::ABC_Path::Generator;
         'get_letters_of_clue type diag',
     );
 
+    # TEST
+    eq_or_diff($riddle->get_letters_of_clue({ type => 'antidiag', }),
+        ['T', 'H',],
+        'get_letters_of_clue type antidiag',
+    );
+
     my $layout = $riddle->get_final_layout();
 
     # TEST