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 '.') { }
22 78 elsif ($enemy->_is_a_hit($x, $y)) { }
121 4 18 unless $remainder
133 0 22 if --$enemy->{'life'} <= 0
152 22 78 $self->{'grid'}{'matrix'}[$x][$y] ne '.' ? :
160 0 24 unless (defined $val)
168 24 27 if ($val eq $_->{$key})