Condition Coverage

blib/lib/Game/TextMapper/Folkesten.pm
Criterion Covered Total %
condition 41 45 91.1


and 3 conditions

line !l l&&!r l&&r condition
145 45 71 1635 $x > 0 and $x <= $self->width
116 38 1597 $x > 0 and $x <= $self->width and $y > 0
109 47 1550 $x > 0 and $x <= $self->width and $y > 0 and $y <= $self->height
218 23 10 4 $self->world->{$other} ne "ocean" and rand() < "0.333333333333333"
229 10 6 4 $self->world->{$other} ne "ocean" and rand() < "0.5"
270 7 14 18 $chance and rand() < $chance
352 0 7 10 $other[0] and $other[0] ne $next
409 5 43 0 $self->legal($hex) and $self->altitude->{$self->world->{$hex}} > $current_altitude
449 23 69 8 not $dry and $self->world->{$hex} eq "mountain"
483 33 17 32 $self->wet->{$hex} and rand() < "0.5"
3 41 6 not $self->dry->{$hex} || &any(sub { $self->dry->{$_}; } , $self->all_neighbors($hex)) and rand() < "0.166666666666667"
498 0 18 64 not $self->dry->{$hex} and &any(sub { $forest_hexes{$_}; } , $self->all_neighbors($hex))
18 39 25 not $self->dry->{$hex} and &any(sub { $forest_hexes{$_}; } , $self->all_neighbors($hex)) and rand() < "0.333333333333333"

or 3 conditions

line l !l&&r !l&&!r condition
483 0 3 47 $self->dry->{$hex} || &any(sub { $self->dry->{$_}; } , $self->all_neighbors($hex))
32 6 44 $self->wet->{$hex} and rand() < "0.5" or not $self->dry->{$hex} || &any(sub { $self->dry->{$_}; } , $self->all_neighbors($hex)) and rand() < "0.166666666666667"