Branch Coverage

blib/lib/Game/TextMapper/Schroeder/Island.pm
Criterion Covered Total %
branch 59 70 84.2


line true false branch
64 1055 145 if ($altitude->{$coordinates} <= $self->bottom)
70 4858 384 if not $legal or $altitude->{$other} <= $self->bottom
73 821 234 $ocean ? :
80 27 37 if $self->hotspot->[0] > $self->width - 2 * $self->radius
84 5 32 if (rand() < 0.2) { }
89 19 18 if (rand() < "0.5")
90 11 8 if (rand() > $self->hotspot->[1] / $self->height) { }
100 1816 1127 if ($self->distance($x, $y, @{$self->hotspot;}) <= $self->radius)
109 1816 20384 if ($hot{$coordinates}) { }
111 375 1441 if rand() < "0.2"
114 4107 16277 if rand() < "0.2"
116 17718 4482 unless $change
119 3864 618 if $altitude->{$coordinates} < $self->bottom
120 0 4482 if $altitude->{$coordinates} > $self->top
127 27 1816 unless $self->legal($x, $y)
129 66 1750 if $altitude->{$other} - $altitude->{$coordinates} > 1
132 66 1750 if $change
145 1055 145 unless $altitude->{$coordinates}
146 26 119 if $world->{$coordinates} =~ /mountain|lake/u
147 81 38 if ($altitude->{$coordinates} == 1) { }
30 8 elsif ($altitude->{$coordinates} == 2) { }
6 2 elsif ($altitude->{$coordinates} == 3) { }
2 0 elsif ($altitude->{$coordinates} == 4) { }
0 0 elsif ($altitude->{$coordinates} > 4) { }
169 90 1409 unless $self->legal($x, $y)
171 1167 242 if $altitude->{$other} == 0
172 27 215 if $altitude->{$coordinates} > $altitude->{$other}
184 1055 145 if $altitude->{$coordinates} == 0
187 0 323 unless $self->legal($x, $y)
189 123 200 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