Branch Coverage

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


line true false branch
87 0 4 $enemy ? :
94 0 101 unless $enemy
95 0 101 unless defined $x and defined $y
98 101 0 if ($enemy->{'life'} > 0) { }
101 2 99 unless exists $$self{$enemy->{'name'}}
106 1 100 if ($$map_pos ne '.') { }
20 80 elsif ($enemy->_is_a_hit($x, $y)) { }
123 2 18 unless $remainder
135 0 20 if --$enemy->{'life'} <= 0
154 20 80 $self->{'grid'}{'matrix'}[$x][$y] ne '.' ? :
162 0 22 unless (defined $val)
170 22 35 if ($val eq $_->{$key})