Branch Coverage

blib/lib/Game/TextMapper/Schroeder/Island.pm
Criterion Covered Total %
branch 61 70 87.1


line true false branch
64 1070 130 if ($altitude->{$coordinates} <= $self->bottom)
70 4956 398 if not $legal or $altitude->{$other} <= $self->bottom
73 820 250 $ocean ? :
80 36 28 if $self->hotspot->[0] > $self->width - 2 * $self->radius
84 8 20 if (rand() < 0.2) { }
89 12 16 if (rand() < "0.5")
90 7 5 if (rand() > $self->hotspot->[1] / $self->height) { }
100 1339 848 if ($self->distance($x, $y, @{$self->hotspot;}) <= $self->radius)
109 1339 15461 if ($hot{$coordinates}) { }
111 275 1064 if rand() < "0.2"
114 3124 12337 if rand() < "0.2"
116 13401 3399 unless $change
119 2977 422 if $altitude->{$coordinates} < $self->bottom
120 0 3399 if $altitude->{$coordinates} > $self->top
127 16 1339 unless $self->legal($x, $y)
129 39 1300 if $altitude->{$other} - $altitude->{$coordinates} > 1
132 39 1300 if $change
145 1070 130 unless $altitude->{$coordinates}
146 29 101 if $world->{$coordinates} =~ /mountain|lake/u
147 70 31 if ($altitude->{$coordinates} == 1) { }
27 4 elsif ($altitude->{$coordinates} == 2) { }
3 1 elsif ($altitude->{$coordinates} == 3) { }
0 1 elsif ($altitude->{$coordinates} == 4) { }
1 0 elsif ($altitude->{$coordinates} > 4) { }
169 90 1393 unless $self->legal($x, $y)
171 1184 209 if $altitude->{$other} == 0
172 9 200 if $altitude->{$coordinates} > $altitude->{$other}
184 1070 130 if $altitude->{$coordinates} == 0
187 2 321 unless $self->legal($x, $y)
189 107 214 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