Commits

Anonymous committed b14b57f

Now checking for "only letter that can be at ($x,$y)".

Comments (0)

Files changed (1)

abc-path/perl-quick-and-dirty/abc-path-solver.pl

                 });
             }
         }
+
+        xy_loop(sub {
+            my ($x, $y) = @_;
+
+            my $letters_aref = get_possible_letters($x, $y);
+
+            if (@$letters_aref == 1)
+            {
+                my $letter = $letters_aref->[0];
+
+                if (get_verdict($letter, $x, $y) == $ABCP_VERDICT_MAYBE)
+                {
+                    $num_changed++;
+                    set_conclusive_verdict_for_letter($letter, [$x, $y]);
+                    print "The only letter that can be at ($x,$y) is $letters[$letter]. Invaladiting it for all other cells.\n";
+                }
+            }
+        });
     }
 }