Condition Coverage

lib/Settlers/Game.pm
Criterion Covered Total %
condition 108 199 54.2


and 3 conditions

line !l l&&!r l&&r condition
99 0 0 240 $code && $value
11 229 0 exists $value->{'player'} and $sender ne 'A'
240 0 0 exists $value->{'player'} and $sender ne 'A' and $value->{'player'} ne $sender
169 0 0 30 $player_number and $location
181 22 4 4 $self->phase eq 'Deployment' and $self->round == 2
26 4 0 $self->phase eq 'Deployment' and $self->round == 2 and scalar @{$self->player->settlements;} == 1
183 28 2 0 $self->player->has_built_road and $self->phase eq 'Deployment'
188 0 0 2 defined $self->{'road_building'} and $self->{'road_building'}->can_build_road
230 40 11 17 @players == 1 and $road_length >= 5
51 15 2 @players == 1 and $road_length >= 5 and not $player->longest_road
266 0 0 15 $player_number and $location
275 13 0 1 $self->player->has_built_settlement and $self->phase eq 'Deployment'
296 5 4 4 $self->phase eq 'Deployment' and $self->round == 2
312 0 0 6 $player_number and $location
359 0 0 8 $player_number and $type
425 0 2 1 @players == 1 and $knights_played >= 3
2 0 1 @players == 1 and $knights_played >= 3 and not $player->largest_army
451 0 0 1 $player_number and $code
474 0 0 1 $player_number and $resources
0 0 1 $player_number and $resources and ref $resources eq 'HASH'
525 0 0 0 $player and $resources
0 0 0 $player and $resources and ref $resources eq 'HASH'
0 0 0 $player and $resources and ref $resources eq 'HASH' and 1 == keys %$resources
0 0 0 $player and $resources and ref $resources eq 'HASH' and 1 == keys %$resources and exists $resources->{$player_number}
531 0 0 0 $self->phase eq 'Play' and 1 == grep(($player_number == $_->{'player'}->number), @{$self->robber->check_players_to_concede;})
557 0 0 9 $player_number eq 'A' || grep(($player_number eq $_->number), @{$self->players;}) and $msg
597 0 0 6 $player and $target_player
619 0 0 7 $player_number and $location
650 0 0 1 $self->round == 2 and $self->player->number eq '1'
672 14 1 1 $self->phase eq 'Deployment' and $self->round == 2
683 56 5 2 $self->phase eq 'Deployment' and $self->turn == @{$self->players;}
61 1 1 $self->phase eq 'Deployment' and $self->turn == @{$self->players;} and @{$self->player->settlements;} == 1
56 3 3 $self->phase eq 'Deployment' and @{$self->player->settlements;} == 2
3 42 14 $self->phase eq 'Play' and $self->{'turn_index'} + 1 == @{$self->players;}
728 1 0 8 $self->player->has_built_road && $self->player->has_built_settlement
56 8 1 $self->phase eq 'Deployment' and not $self->player->has_built_road && $self->player->has_built_settlement
752 48 2 14 $self->turn == @{$self->players;} and $self->phase eq 'Play'
42 4 4 $self->phase eq 'Deployment' and @{$self->player->properties;} == 2
46 3 1 $self->phase eq 'Deployment' and @{$self->player->properties;} == 2 and $self->turn == 1
42 3 4 $self->phase eq 'Deployment' and @{$self->player->properties;} == 1
45 3 1 $self->phase eq 'Deployment' and @{$self->player->properties;} == 1 and $self->turn == @{$self->players;}
910 0 0 5 grep(($self->player->number == $_), keys %$details) and $player_number == $self->player->number
940 0 0 9 $player_number and $uuid
0 9 0 $player_number and $uuid and exists $self->trades->{$uuid}
0 0 9 $player_number and $uuid and exists $self->trades->{$uuid} and $self->trades->{$uuid}{'player'} != $player_number
0 0 9 $player_number and $uuid and exists $self->trades->{$uuid} and $self->trades->{$uuid}{'player'} != $player_number and $self->trades->{$uuid}{'trade'}->resources($player_number)
960 0 0 1 $player_number and $uuid
0 1 0 $player_number and $uuid and exists $self->trades->{$uuid}
0 0 1 $player_number and $uuid and exists $self->trades->{$uuid} and $self->trades->{$uuid}{'player'} == $player_number
0 0 1 $player_number and $uuid and exists $self->trades->{$uuid} and $self->trades->{$uuid}{'player'} == $player_number and $self->trades->{$uuid}{'trade'}->resources($player_number)
1001 0 0 240 $msgs and ref $msgs eq 'ARRAY'

or 2 conditions

line l !l condition
934 9 0 $args->{'uuid'} || ''
954 1 0 $args->{'uuid'} || ''

or 3 conditions

line l !l&&r !l&&!r condition
95 0 240 0 $args->{'uuid'} || 'Data::UUID'->new->create_str
99 0 0 240 not $code && $value or ref $value ne 'HASH'
0 0 240 not $code && $value or ref $value ne 'HASH' or not $sender
188 8 20 2 $self->phase eq 'Deployment' or $self->player->has_rolled_dice
28 0 2 $self->phase eq 'Deployment' or $self->player->has_rolled_dice or defined $self->{'road_building'} and $self->{'road_building'}->can_build_road
202 8 0 22 $self->phase eq 'Deployment' || defined $self->{'road_building'} && $self->{'road_building'}->can_build_road
272 9 5 0 $self->phase eq 'Deployment' or $self->player->has_rolled_dice
287 0 0 78 $intersection->is_colliding($_->location) || $intersection->is_adjacent($_->location)
557 9 0 0 $player_number eq 'A' || grep(($player_number eq $_->number), @{$self->players;})
602 6 0 0 $code ||= $self->robber->steal($target_player)
725 9 56 1 $self->phase eq 'Deployment' or $self->player->has_rolled_dice
752 14 0 50 $self->turn == @{$self->players;} and $self->phase eq 'Play' or $self->phase eq 'Deployment' and @{$self->player->properties;} == 2 and $self->turn == 1
1 0 49 $self->turn == @{$self->players;} and $self->phase eq 'Play' or $self->phase eq 'Deployment' and @{$self->player->properties;} == 2 and $self->turn == 1 or $self->phase eq 'Deployment' and @{$self->player->properties;} == 1 and $self->turn == @{$self->players;}
879 10 0 0 $args->{'uuid'} || 'Data::UUID'->new->create_str