Branch Coverage

blib/lib/Games/Literati.pm
Criterion Covered Total %
branch 91 122 74.5


line true false branch
68 16 0 if defined $_[0]
69 16 0 if defined $_[0]
79 16 3 if defined $_[0]
80 16 3 if defined $_[1]
81 0 19 unless $BoardRows == $BoardCols and $BoardRows % 2 == 1
82 16 3 if defined $_[2]
97 0 19 unless open $fh, $WordFile
100 34 364 if length $_ < $MinimumWordLength
110 0 0 if ($valid{$w} == 1) { }
133 0 0 unless length $letters > 1
138 0 0 if $len > $max_len or $len < $min_len
141 0 0 unless eval $re
145 0 0 unless $check_letters =~ s/$l// or $check_letters =~ s/\?// and $hint .= "($l)"
148 0 0 if (not $internal) { }
156 0 0 if $internal
170 8765 798 unless /^$re$/
174 601 0 unless $check_letters =~ s/$l// and push @v, $values{$l} or $check_letters =~ s/\?// and push @v, 0
190 0 609 if $f
211 1 213 if (length $input > &n_cols())
227 12 1 if $input =~ /^yes$/
237 7 7 unless $input
241 2 15 unless (defined $onboard[$r][$c] and $onboard[$r][$c] ne '.')
255 12 1 unless length $input > $BingoHandLength
278 0 426 unless $solutions{$b} <=> $solutions{$a}
279 8 98 if ++$best > 10
305 5579 25267 if $onboard[$row][$col] ne '.'
315 887 102530 if ($column > &_max_col())
317 77800 24730 unless ($go_on)
318 1426 70764 if ($onboard[$row][$col] ne '.' or $column > 0 and $onboard[$row][$column - 1] ne '.' or $column < &_max_col() and $onboard[$row][$column + 1] ne '.' or $row > 0 and $onboard[$row - 1][$column] ne '.' or $row < &_max_row() and $onboard[$row + 1][$column] ne '.' or $row == &_center_row() and $column == &_center_col())
329 92012 10518 if ($thisrow[$column] eq '.')
335 0 25267 if $column > &n_cols()
336 19118 6149 unless $go_on == 1
350 40317 6149 unless m[/]
361 4261 1888 unless (defined $found{"$actual_letters,$_"})
382 2816 45016 if ($r == $row) { }
395 22253 2760 unless m[/]
396 2097 663 if length $_ == 1
407 1030 1242 $rotate ? :
409 2259 13 unless ($wilds[$vrow][$c])
419 2 661 if ($valid{$_}) { }
420 0 2 if ($bonus[$row][$c] eq 'TL') { }
0 2 elsif ($bonus[$row][$c] eq 'DL') { }
0 2 elsif ($bonus[$row][$c] eq 'DW') { }
0 2 elsif ($bonus[$row][$c] eq 'TW') { }
2 0 elsif ($bonus[$row][$c] =~ /^(\d+)L$/) { }
0 0 elsif ($bonus[$row][$c] =~ /^(\d+)W$/) { }
446 661 2155 if $fail
450 661 211 if $fail
459 1037 90 if ($onboard[$row][$col + $col_index] eq '.') { }
460 0 1037 if ($bonus[$row][$col + $col_index] eq 'TL') { }
23 1014 elsif ($bonus[$row][$col + $col_index] eq 'DL') { }
57 957 elsif ($bonus[$row][$col + $col_index] =~ /^(\d+)L$/) { }
43 914 elsif ($bonus[$row][$col + $col_index] eq 'DW') { }
2 912 elsif ($bonus[$row][$col + $col_index] eq 'TW') { }
95 817 elsif ($bonus[$row][$col + $col_index] =~ /^(\d+)W$/) { }
487 41 49 if $rotate
488 90 0 unless ($wilds[$wr][$wc])
499 56 155 if $use == $BingoHandLength
501 114 97 $rotate ? :
114 97 $rotate ? :
56 155 $use == $BingoHandLength ? :