Branch Coverage

blib/lib/Games/Tournament/Swiss.pm
Criterion Covered Total %
branch 46 82 56.1


line true false branch
12 24 2 @Games::Tournament::Swiss::Config::roles ? :
72 1 77 if (&all(sub { $_->pairingNumber; } , @players))
101 1 143 if ($p == 0)
157 60 60 if $games{$id}
159 0 60 if $round < $player->firstround
161 0 60 unless $opponentId
164 0 60 unless $opponentId eq 'Bye' or $opponentId eq 'Unpaired' or $opponentsOpponent eq $id
170 0 60 if ($opponentId eq 'Unpaired') { }
0 60 elsif ($opponentId eq 'Bye') { }
171 0 0 unless $player and $role eq 'Unpaired'
177 0 0 unless $player and $role eq 'Bye'
181 0 60 unless $player and $opponent and $role and $opponentRole
189 0 60 if $opponentId and defined $opponentRole and $role eq $opponentRole
193 0 60 if ($opponentId eq 'Bye') { }
203 60 0 unless ($opponentId eq 'Bye')
233 0 339 unless $round =~ /^\d+$/
250 290 358 ref $game->result eq 'HASH' ? :
259 0 648 unless $play->{$round}{$id}
263 624 24 unless $score and $score eq 'Bye' || $score eq 'Forfeit'
289 1 139 unless $_->score
301 0 60 unless $orderings[$b]{'higherscore'} <=> $orderings[$a]{'higherscore'} or $orderings[$b]{'totalscore'} <=> $orderings[$a]{'totalscore'}
326 0 0 unless $entrant and $entrant->isa('Games::Tournament::Contestant::Swiss')
370 0 456 if &any(sub { $id eq $_->id; } , @$absentees)
371 401 55 defined $player->score ? :
441 0 0 unless exists $dupes->{$id1}{$id2} or exists $colorbar->{$id1}{$id2}
470 0 1312 unless $player
473 1308 4 if ($game and $game->can('myRole')) { }
4 0 elsif ($player->firstround > $round or &any(sub { $id eq $_; } , @absenteeids)) { }
474 0 1308 if $game->result and $game->result eq 'Bye'
478 0 1308 unless &any(sub { $_ eq $role; } , ('White', 'Black'), 'Bye')
480 0 868 if $game->result and exists $game->result->{$role} and $game->result->{$role} eq 'Forfeit'
481 1270 38 if (&any(sub { $role eq $_; } , ('White', 'Black')))
512 241 2118 if $players->[$player]->preference->role and $players->[$_]->preference->role and $players->[$player]->preference->role eq $players->[$_]->preference->role and $players->[$player]->preference->strength eq 'Absolute' and $players->[$player]->preference->strength eq $players->[$_]->preference->strength
548 1116 4 if ($game and $game->can('myRole')) { }
4 0 elsif ($player->firstround > $round or &any(sub { $id eq $_; } , @absenteeids)) { }
550 0 1116 if not $player or $@
553 38 1078 if ($role eq 'Bye')
585 0 0 if $color
586 0 0 if $round
618 0 0 if (defined $rounds) { }
0 0 elsif ($self->{'rounds'}) { }