Condition Coverage

lib/Catan/Game.pm
Criterion Covered Total %
condition 4 178 2.2


and 3 conditions

line !l l&&!r l&&r condition
64 0 0 1 exists $args->{'log'} && ref $args->{'log'} eq 'GLOB'
110 0 0 0 $player_number and $location
119 0 0 0 $self->player->has_built_road and $self->phase eq 'Deployment'
124 0 0 0 defined $self->{'road_building'} and $self->{'road_building'}->can_build_road
166 0 0 0 @players == 1 and $road_length >= 6
0 0 0 @players == 1 and $road_length >= 6 and not $player->longest_road
202 0 0 0 $player_number and $location
211 0 0 0 $self->player->has_built_settlement and $self->phase eq 'Deployment'
232 0 0 0 $self->phase eq 'Deployment' and $self->round == 2
248 0 0 0 $player_number and $location
295 0 0 0 $player_number and $type
361 0 0 0 @players == 1 and $knights_played >= 3
0 0 0 @players == 1 and $knights_played >= 3 and not $player->largest_army
387 0 0 0 $player_number and $code
410 0 0 0 $player_number and $resources
0 0 0 $player_number and $resources and ref $resources eq 'HASH'
463 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}
0 0 0 $player and $resources and ref $resources eq 'HASH' and 1 == keys %$resources and exists $resources->{$player_number} and &all(sub { $_ < 0; } , values %{$$resources{$player_number};})
0 0 0 $player and $resources and ref $resources eq 'HASH' and 1 == keys %$resources and exists $resources->{$player_number} and &all(sub { $_ < 0; } , values %{$$resources{$player_number};}) and 1 == grep(($player_number == $_->{'player'}->number), @{$self->robber->check_players_to_concede;})
488 0 0 6 $player_number eq 'A' || $self->is_player_number($player_number) and $msg
529 0 0 0 $player and $target_player
552 0 0 0 $player_number and $location
585 0 0 0 $self->phase eq 'Deployment' and $self->round == 2
596 0 0 0 $self->phase eq 'Deployment' and $self->turn == @{$self->players;}
0 0 0 $self->phase eq 'Deployment' and $self->turn == @{$self->players;} and @{$self->player->settlements;} == 1
0 0 0 $self->phase eq 'Deployment' and @{$self->player->settlements;} == 2
0 0 0 $self->phase eq 'Play' and $self->{'turn_index'} + 1 == @{$self->players;}
641 0 0 0 $self->player->has_built_road && $self->player->has_built_settlement
0 0 0 $self->phase eq 'Deployment' and not $self->player->has_built_road && $self->player->has_built_settlement
664 0 0 0 $self->turn == @{$self->players;} and $self->phase eq 'Play'
0 0 0 $self->phase eq 'Deployment' and @{$self->player->properties;} == 2
0 0 0 $self->phase eq 'Deployment' and @{$self->player->properties;} == 2 and $self->turn == 1
0 0 0 $self->phase eq 'Deployment' and @{$self->player->properties;} == 1
0 0 0 $self->phase eq 'Deployment' and @{$self->player->properties;} == 1 and $self->turn == @{$self->players;}
816 0 0 0 grep(($self->player->number == $_), keys %$details) and $player_number == $self->player->number
846 0 0 0 $player_number and $uuid
0 0 0 $player_number and $uuid and exists $self->trades->{$uuid}
0 0 0 $player_number and $uuid and exists $self->trades->{$uuid} and $self->trades->{$uuid}{'player'} != $player_number
0 0 0 $player_number and $uuid and exists $self->trades->{$uuid} and $self->trades->{$uuid}{'player'} != $player_number and $self->trades->{$uuid}{'trade'}->resources($player_number)
866 0 0 0 $player_number and $uuid
0 0 0 $player_number and $uuid and exists $self->trades->{$uuid}
0 0 0 $player_number and $uuid and exists $self->trades->{$uuid} and $self->trades->{$uuid}{'player'} == $player_number
0 0 0 $player_number and $uuid and exists $self->trades->{$uuid} and $self->trades->{$uuid}{'player'} == $player_number and $self->trades->{$uuid}{'trade'}->resources($player_number)
915 0 0 11 $msgs and ref $msgs eq 'ARRAY'

or 2 conditions

line l !l condition
840 0 0 $args->{'uuid'} || ''
860 0 0 $args->{'uuid'} || ''

or 3 conditions

line l !l&&r !l&&!r condition
124 0 0 0 $self->phase eq 'Deployment' or $self->player->has_rolled_dice
0 0 0 $self->phase eq 'Deployment' or $self->player->has_rolled_dice or defined $self->{'road_building'} and $self->{'road_building'}->can_build_road
138 0 0 0 $self->phase eq 'Deployment' || defined $self->{'road_building'} && $self->{'road_building'}->can_build_road
208 0 0 0 $self->phase eq 'Deployment' or $self->player->has_rolled_dice
223 0 0 0 $intersection->is_colliding($_->location) || $intersection->is_adjacent($_->location)
488 6 0 0 $player_number eq 'A' || $self->is_player_number($player_number)
534 0 0 0 $code ||= $self->robber->steal($target_player)
638 0 0 0 $self->phase eq 'Deployment' or $self->player->has_rolled_dice
664 0 0 0 $self->turn == @{$self->players;} and $self->phase eq 'Play' or $self->phase eq 'Deployment' and @{$self->player->properties;} == 2 and $self->turn == 1
0 0 0 $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;}
788 0 0 0 $args->{'uuid'} || 'Data::UUID'->new->create_str