Branch Coverage

blib/lib/Game/Battleship/Grid.pm
Criterion Covered Total %
branch 29 50 58.0


line true false branch
36 0 15 if (defined $craft->position) { }
64 17 5 if ($x1 <= $self->dimension->[0] and $y1 <= $self->dimension->[1])
73 62 15 if ($craft->name ne $_->name)
75 2 60 if (defined $_->position and _segment_intersection($x0, $y0, $x1, $y1, @{$_->position->[0];}, @{$_->position->[1];}))
89 15 2 unless $collide
100 29 22 if ($orient) { }
116 22 0 unless defined $orient
121 11 11 if ($orient) { }
141 0 32 unless @_ == 8
159 19 13 if ($delta != 0) { }
164 1 18 $u <= 1 && $u >= 0 && $v <= 1 && $v >= 0 ? :
168 11 2 if $t1 != 0 and $t2 != 0
176 2 0 if ($x0 != $x1) { }
178 2 0 $x0 < $x1 ? :
179 0 2 $x0 > $x1 ? :
180 2 0 $x2 < $x3 ? :
181 0 2 $x2 > $x3 ? :
183 1 1 if ($d < $a or $c > $b) { }
0 1 elsif ($d == $a or $c == $b) { }
197 0 0 $y0 < $y1 ? :
198 0 0 $y0 > $y1 ? :
199 0 0 $y2 < $y3 ? :
200 0 0 $y2 > $y3 ? :
202 0 0 if ($d < $a or $c > $b) { }
0 0 elsif ($d == $a or $c == $b) { }