Branch Coverage

blib/lib/Game/Battleship/Grid.pm
Criterion Covered Total %
branch 27 48 56.2


line true false branch
38 0 15 if (defined $craft->{'position'}) { }
64 22 5 if ($x1 <= $self->{'dimension'}[0] and $y1 <= $self->{'dimension'}[1])
73 71 15 if ($craft->{'name'} ne $_->{'name'})
75 7 64 if (defined $_->{'position'} and _segment_intersection($x0, $y0, $x1, $y1, @{$$_{'position'}[0];}, @{$$_{'position'}[1];}))
89 15 7 unless $collide
100 13 38 if ($orient) { }
120 12 15 if ($orient) { }
140 0 41 unless @_ == 8
158 24 17 if ($delta != 0) { }
163 6 18 $u <= 1 && $u >= 0 && $v <= 1 && $v >= 0 ? :
167 16 1 if $t1 != 0 and $t2 != 0
175 0 1 if ($x0 != $x1) { }
177 0 0 $x0 < $x1 ? :
178 0 0 $x0 > $x1 ? :
179 0 0 $x2 < $x3 ? :
180 0 0 $x2 > $x3 ? :
182 0 0 if ($d < $a or $c > $b) { }
0 0 elsif ($d == $a or $c == $b) { }
196 1 0 $y0 < $y1 ? :
197 0 1 $y0 > $y1 ? :
198 1 0 $y2 < $y3 ? :
199 0 1 $y2 > $y3 ? :
201 0 1 if ($d < $a or $c > $b) { }
0 1 elsif ($d == $a or $c == $b) { }