Branch Coverage

blib/lib/Games/LMSolve/Plank/Base.pm
Criterion Covered Total %
branch 57 90 63.3


line true false branch
45 0 1 if (scalar @{$input_fields->{'layout'}{'value'};} < $height)
55 0 5 if (length $lines->[$y] < $width)
64 1 34 if ($c eq 'G')
66 0 1 if (defined $goal_x)
76 0 1 unless (defined $goal_x)
93 0 4 unless ($board[$start_y][$start_x])
97 0 4 if (not $board[$end_y][$end_x])
105 0 4 if ($start_x >= $width or $end_x >= $width or $start_y >= $height or $end_y >= $height)
113 1 3 if ($start_x == $end_x) { }
3 0 elsif ($start_y == $end_y) { }
0 0 elsif ($end_x - $start_x == $end_y - $start_y) { }
115 0 1 if ($start_y == $end_y)
120 0 1 if ($start_y > $end_y)
126 0 0 if ($board[$y][$start_x])
140 0 3 if ($start_x > $end_x)
146 0 3 if ($board[$start_y][$x])
160 0 0 if ($start_x > $end_x)
167 0 0 if ($board[$start_y + $i][$start_x + $i])
172 0 0 unless (grep {$_ eq 'SE';} @{$$self{'dirs'};})
213 0 1 $_->{'dir'} eq 'SE' ? :
3 1 $_->{'dir'} eq 'E' ? :
255 1230 0 $p_dir == 1 ? :
1338 1230 $p_dir == 0 ? :
274 3901 4551 if ($p->{'active'})
278 464 4087 if ($p->{'x'} == $x and $p->{'y'} == $y)
283 365 4186 if ($p->{'end_x'} == $x and $p->{'end_y'} == $y)
292 642 322 if ($planks[$i]{'active'})
330 0 0 $p->{'active'} ? :
351 332 0 unless $_->{'x'} == $goal_x and $_->{'y'} == $goal_y
389 166 162 unless ($to_move->{'active'})
395 256 392 unless ($move_to->{'active'})
412 348 2788 if ($other_x < 0 or $other_x >= $width)
416 593 2195 if ($other_y < 0 or $other_y >= $height)
423 558 1637 if (exists $current{&$serialize($x, $y, $other_x, $other_y)})
431 1378 259 unless ($board->[$other_y][$other_x])
442 15 261 if ($board->[$iy][$ix])
453 261 771 if ($collision_plank_idx == $to_move_idx)
462 6 1886 if ($p_x == $ix and $p_y == $iy)
506 34 204 if ($dir eq 'S') { }
21 183 elsif ($dir eq 'E') { }
76 107 elsif ($dir eq 'N') { }
107 0 elsif ($dir eq 'W') { }
0 0 elsif ($dir eq 'NW') { }
0 0 elsif ($dir eq 'SE') { }
551 19 0 if ($move) { }