blib/lib/Game/Battleship.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
branch | 10 | 22 | 45.4 |
line | true | false | branch |
---|---|---|---|
23 | 3 | 0 | unless ($i) |
30 | 0 | 3 | if $n > $_ |
40 | 0 | 3 | if (exists $self->{'players'}{$who}) |
46 | 0 | 3 | unless $player |
49 | 0 | 3 | if (ref $player eq 'Game::Battleship::Player') { } |
0 | 3 | elsif (ref $player eq 'HASH') { } | |
81 | 7 | 4 | if ($_ eq $name or $self->{'players'}{$_}->name eq $name or $self->{'players'}{$_}->id eq $name) |
91 | 1 | 9 | unless $player |
103 | 0 | 0 | unless $player->life |
107 | 0 | 0 | if $opponent->name eq $player->name or not $opponent->life |
122 | 0 | 0 | @alive == 1 ? : |