Branch Coverage

lib/Settlers/Map.pm
Criterion Covered Total %
branch 37 54 68.5


line true false branch
30 0 7 unless exists $args->{'type'}
33 2 5 if ($args->{'type'} eq 'starter') { }
2 3 elsif ($args->{'type'} eq 'random') { }
3 0 elsif ($args->{'type'} eq 'custom') { }
46 1 2 unless exists $args->{'schema'}{'tiles'} and exists $args->{'schema'}{'harbors'}
71 0 580 unless $coordinates and ref $coordinates eq 'ARRAY' and @$coordinates == 2
82 0 2 unless $type_code and $type_code =~ qr/^[A-Z]$/
88 2 72 if $tile->code eq $type_code
97 0 54 unless defined $number and $number =~ qr/^[0-9]+$/
103 88 1910 if $tile->number == $number
112 0 5 unless $intersection and ref $intersection eq 'Settlers::Map::Intersection'
118 15 170 if $intersection->is_adjacent($tile)
126 0 190 unless $coordinates and ref $coordinates eq 'ARRAY' and @$coordinates == 3
141 0 85 unless $coordinates and ref $coordinates eq 'ARRAY' and @$coordinates == 2
159 0 6 unless $map_plan and ref $map_plan eq 'ARRAY'
166 0 222 unless not defined $resource_number or grep(($resource_number == $_), @resource_numbers)
172 222 0 exists $tile_types{$tile_code} ? :
184 0 6 unless $map and ref $map eq 'HASH' and keys %$map == 37
190 0 6 unless $centre_tile
203 360 972 unless $tile2 and $tile3
216 0 6 unless $intersections and ref $intersections eq 'HASH' and keys %$intersections == 54
230 16632 864 if $i1 eq $i2 or not $i1->is_adjacent($i2)
250 0 6 unless $harbors and ref $harbors eq 'ARRAY'
258 0 54 unless exists $harbor_types{$code}
329 0 2 $type eq 'D' ? :
345 60 36 if grep(($neighbor->{'q'} == $_->[0] && $neighbor->{'r'} == $_->[1]), @land_tiles, @new_tiles)
350 2 34 $type eq 'D' ? :