Branch Coverage

blib/lib/Game/TextMapper/Schroeder/Island.pm
Criterion Covered Total %
branch 60 70 85.7


line true false branch
64 1078 122 if ($altitude->{$coordinates} <= $self->bottom)
70 4984 400 if not $legal or $altitude->{$other} <= $self->bottom
73 827 251 $ocean ? :
80 26 38 if $self->hotspot->[0] > $self->width - 2 * $self->radius
84 5 33 if (rand() < 0.2) { }
89 21 17 if (rand() < "0.5")
90 13 8 if (rand() > $self->hotspot->[1] / $self->height) { }
100 1790 1234 if ($self->distance($x, $y, @{$self->hotspot;}) <= $self->radius)
109 1790 21010 if ($hot{$coordinates}) { }
111 347 1443 if rand() < "0.2"
114 4149 16861 if rand() < "0.2"
116 18304 4496 unless $change
119 3905 591 if $altitude->{$coordinates} < $self->bottom
120 0 4496 if $altitude->{$coordinates} > $self->top
127 15 1790 unless $self->legal($x, $y)
129 65 1725 if $altitude->{$other} - $altitude->{$coordinates} > 1
132 65 1725 if $change
145 1078 122 unless $altitude->{$coordinates}
146 26 96 if $world->{$coordinates} =~ /mountain|lake/u
147 70 26 if ($altitude->{$coordinates} == 1) { }
15 11 elsif ($altitude->{$coordinates} == 2) { }
7 4 elsif ($altitude->{$coordinates} == 3) { }
4 0 elsif ($altitude->{$coordinates} == 4) { }
0 0 elsif ($altitude->{$coordinates} > 4) { }
169 90 1368 unless $self->legal($x, $y)
171 1184 184 if $altitude->{$other} == 0
172 13 171 if $altitude->{$coordinates} > $altitude->{$other}
184 1078 122 if $altitude->{$coordinates} == 0
187 1 314 unless $self->legal($x, $y)
189 98 216 if $altitude->{$other} > 0
222 0 78 if $step == $i++
256 0 2 if ($step > 0)
258 0 0 if ($step)
272 0 2 if ($step > 0)
284 2 0 if $url