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 51 48 1676 $x > 0 and $x <= $self->width
99 46 1630 $x > 0 and $x <= $self->width and $y > 0
94 43 1587 $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 17 13 18 $chance and rand() < $chance
352 0 8 8 $other[0] and $other[0] ne $next
409 10 54 0 $self->legal($hex) and $self->altitude->{$self->world->{$hex}} > $current_altitude
449 29 64 7 not $dry and $self->world->{$hex} eq "mountain"
483 46 30 24 $self->wet->{$hex} and rand() < "0.5"
22 41 13 not $self->dry->{$hex} || &any(sub { $self->dry->{$_}; } , $self->all_neighbors($hex)) and rand() < "0.166666666666667"
498 7 22 71 not $self->dry->{$hex} and &any(sub { $forest_hexes{$_}; } , $self->all_neighbors($hex))
29 44 27 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 7 15 54 $self->dry->{$hex} || &any(sub { $self->dry->{$_}; } , $self->all_neighbors($hex))
24 14 62 $self->wet->{$hex} and rand() < "0.5" or not $self->dry->{$hex} || &any(sub { $self->dry->{$_}; } , $self->all_neighbors($hex)) and rand() < "0.166666666666667"