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'};})
212 0 1 $_->{'dir'} eq 'SE' ? :
3 1 $_->{'dir'} eq 'E' ? :
254 1230 0 $p_dir == 1 ? :
1338 1230 $p_dir == 0 ? :
273 3901 4551 if ($p->{'active'})
277 464 4087 if ($p->{'x'} == $x and $p->{'y'} == $y)
282 365 4186 if ($p->{'end_x'} == $x and $p->{'end_y'} == $y)
291 642 322 if ($planks[$i]{'active'})
329 0 0 $p->{'active'} ? :
350 332 0 unless $_->{'x'} == $goal_x and $_->{'y'} == $goal_y
388 166 162 unless ($to_move->{'active'})
394 256 392 unless ($move_to->{'active'})
411 348 2788 if ($other_x < 0 or $other_x >= $width)
415 593 2195 if ($other_y < 0 or $other_y >= $height)
422 558 1637 if (exists $current{&$serialize($x, $y, $other_x, $other_y)})
430 1378 259 unless ($board->[$other_y][$other_x])
441 15 261 if ($board->[$iy][$ix])
452 261 771 if ($collision_plank_idx == $to_move_idx)
461 6 1886 if ($p_x == $ix and $p_y == $iy)
505 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') { }
550 19 0 if ($move) { }