| line |
true |
false |
branch |
|
36
|
1 |
0 |
if ($start_grid_string) |
|
37
|
0 |
1 |
unless my $sudoku = solve($start_grid_string) |
|
42
|
0 |
1 |
if ($sc != 1) |
|
43
|
0 |
0 |
$sc > 1 ? : |
|
48
|
0 |
1 |
$start_grid_string && $start_grid_string =~ /[^1-9]/ ? : |
|
50
|
1 |
0 |
unless defined $start_with |
|
51
|
0 |
1 |
unless defined $shuffle_symbols |
|
65
|
0 |
2 |
if $VERBOSE |
|
68
|
162 |
0 |
$grid->[$_] =~ /[1-9]/ ? : |
|
71
|
0 |
2 |
if $to_drop < 0 |
|
73
|
0 |
2 |
$check_reducibility ? : |
|
77
|
2 |
0 |
if ($to_drop and not $check_reducibility) |
|
78
|
0 |
2 |
unless drop_values($grid, $to_drop, $fields_to_try, $dropped_fields) |
|
86
|
2 |
80 |
unless (drop_values($grid, 1, $fields_to_try, $dropped_fields)) |
|
88
|
1 |
1 |
if ($to_be_reduced) { } |
|
|
0 |
2 |
elsif ($check_reducibility and not $to_be_reduced) { } |
|
104
|
0 |
80 |
unless my $sudoku = solve($grid) |
|
108
|
0 |
80 |
if $VERBOSE |
|
110
|
16 |
64 |
if ($solution_count == 1) |
|
111
|
15 |
0 |
if (not $to_be_reduced or $to_be_reduced->{'uniqueGivens'} > $sudoku->{'uniqueGivens'} or $to_be_reduced->{'givensCount'} >= $sudoku->{'givensCount'}) |
|
119
|
0 |
64 |
unless ($solution_count == 2) |
|
130
|
0 |
1 |
if ($check_reducibility) |
|
150
|
2 |
162 |
unless defined $field_index |
|
152
|
0 |
162 |
if $VERBOSE |
|
153
|
0 |
162 |
if not $symbol or $symbol eq "." |
|
166
|
0 |
64 |
unless my($field_index, $symbol) = @{pop @$dropped;} |
|
168
|
0 |
64 |
if $VERBOSE |
|
197
|
0 |
8728 |
if $index > $list->$#* |
|
223
|
9 |
8719 |
if ($test_vector->is_empty) |
|
231
|
0 |
9 |
unless $could_place |
|
234
|
1 |
0 |
if $placed == 9 |
|
244
|
0 |
1 |
$do_shuffle ? : |
|
262
|
0 |
2 |
if $VERBOSE |
|
271
|
0 |
0 |
if $sub_to_execute |