Condition Coverage

blib/lib/Game/TextMapper/Folkesten.pm
Criterion Covered Total %
condition 37 45 82.2


and 3 conditions

line !l l&&!r l&&r condition
145 58 40 1664 $x > 0 and $x <= $self->width
98 44 1620 $x > 0 and $x <= $self->width and $y > 0
84 49 1571 $x > 0 and $x <= $self->width and $y > 0 and $y <= $self->height
218 0 0 0 $self->world->{$other} ne "ocean" and rand() < "0.333333333333333"
229 0 0 0 $self->world->{$other} ne "ocean" and rand() < "0.5"
270 7 11 12 $chance and rand() < $chance
352 0 6 10 $other[0] and $other[0] ne $next
409 6 41 0 $self->legal($hex) and $self->altitude->{$self->world->{$hex}} > $current_altitude
449 16 78 6 not $dry and $self->world->{$hex} eq "mountain"
483 57 29 14 $self->wet->{$hex} and rand() < "0.5"
9 62 15 not $self->dry->{$hex} || &any(sub { $self->dry->{$_}; } , $self->all_neighbors($hex)) and rand() < "0.166666666666667"
498 3 28 69 not $self->dry->{$hex} and &any(sub { $forest_hexes{$_}; } , $self->all_neighbors($hex))
31 54 15 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 3 6 77 $self->dry->{$hex} || &any(sub { $self->dry->{$_}; } , $self->all_neighbors($hex))
14 18 68 $self->wet->{$hex} and rand() < "0.5" or not $self->dry->{$hex} || &any(sub { $self->dry->{$_}; } , $self->all_neighbors($hex)) and rand() < "0.166666666666667"