Branch Coverage

blib/lib/Games/Literati.pm
Criterion Covered Total %
branch 125 136 91.9


line true false branch
71 21 0 if defined $_[0]
72 21 0 if defined $_[0]
83 21 3 if defined $_[0]
84 21 3 if defined $_[1]
85 0 24 unless $BoardRows == $BoardCols and $BoardRows % 2 == 1
86 21 3 if defined $_[2]
102 0 24 unless open $fh, $WordFile
105 44 464 if length $_ < $MinimumWordLength
115 2 2 if (exists $valid{$w} and $valid{$w} == 1) { }
138 0 3 unless length $letters > 1
142 3 57 if $len > $max_len or $len < $min_len
145 43 14 unless eval $re
149 9 4 unless $check_letters =~ s/$l// or $check_letters =~ s/\?// and $hint .= "($l)"
152 2 3 if ($internal) { }
160 1 2 if $internal
172 9532 889 unless /^$re$/
186 0 4 unless $check_letters =~ s/$l// and push @v, $values{$l} and push @ltrs, $l or $check_letters =~ s/\?// and push @v, 0 and push @ltrs, '?'
201 0 789 if $f
222 1 273 if (length $input > &n_cols())
238 16 1 if $input =~ /^yes$/
248 11 7 unless $input
252 2 15 unless (defined $onboard[$r][$c] and $onboard[$r][$c] ne '.')
266 16 1 unless length $input > $BingoHandLength
289 0 1070 unless $solutions{$b} <=> $solutions{$a}
290 11 130 if ++$best > 10
316 6816 28680 if $onboard[$row][$col] ne '.'
326 915 109585 if ($column > &_max_col())
328 83159 26426 unless ($go_on)
329 1768 74449 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())
340 98629 10956 if ($thisrow[$column] eq '.')
346 0 28680 if $column > &n_cols()
347 20885 7795 unless $go_on == 1
360 51597 7795 unless m[/]
371 4623 3172 unless (defined $found{"$actual_letters,$_"})
385 0 1696 unless $tryin->{'tiles_this_word'}
393 4301 65806 if ($r == $row) { }
406 33830 4149 unless m[/]
407 2742 1407 if length $_ == 1
418 1534 1740 $rotate ? :
420 3261 13 unless ($wilds[$vrow][$c])
430 122 1285 if ($valid{$_}) { }
431 6 116 if ($bonus[$row][$c] eq 'TL') { }
12 104 elsif ($bonus[$row][$c] eq 'DL') { }
6 98 elsif ($bonus[$row][$c] eq 'DW') { }
2 96 elsif ($bonus[$row][$c] eq 'TW') { }
26 70 elsif ($bonus[$row][$c] =~ /^(\d+)L$/) { }
24 46 elsif ($bonus[$row][$c] =~ /^(\d+)W$/) { }
457 1285 3016 if $fail
461 1285 411 if $fail
470 1415 233 if ($onboard[$row][$col + $col_index] eq '.') { }
471 11 1404 if ($bonus[$row][$col + $col_index] eq 'TL') { }
45 1359 elsif ($bonus[$row][$col + $col_index] eq 'DL') { }
111 1248 elsif ($bonus[$row][$col + $col_index] =~ /^(\d+)L$/) { }
53 1195 elsif ($bonus[$row][$col + $col_index] eq 'DW') { }
7 1188 elsif ($bonus[$row][$col + $col_index] eq 'TW') { }
133 1055 elsif ($bonus[$row][$col + $col_index] =~ /^(\d+)W$/) { }
498 124 109 if $rotate
499 233 0 unless ($wilds[$wr][$wc])
510 56 355 if $use == $BingoHandLength
512 233 178 $rotate ? :
233 178 $rotate ? :
56 355 $use == $BingoHandLength ? :
527 1415 233 if '/' eq substr($record, $offs, 1)
532 233 178 $rotate ? :
233 178 $rotate ? :
233 178 $rotate ? :
980 3 8 unless $hand_tiles =~ s/\Q$tile\E//
983 1 2 if length $stuck