Branch Coverage

blib/lib/Game/Battleship/Player.pm
Criterion Covered Total %
branch 18 24 75.0


line true false branch
85 0 4 $enemy ? :
92 0 101 unless $enemy
93 0 101 unless defined $x and defined $y
96 101 0 if ($enemy->life > 0) { }
99 2 99 unless exists $$self{$enemy->name}
104 1 100 if ($$map_pos ne '.') { }
13 87 elsif ($enemy->_is_a_hit($x, $y)) { }
121 2 11 unless $remainder
133 0 13 if --$enemy->{'life'} <= 0
152 13 87 $self->{'grid'}{'matrix'}[$x][$y] ne '.' ? :
160 0 15 unless (defined $val)
168 15 19 if ($val eq $_->{$key})