Branch Coverage

blib/lib/Games/RolePlay/MapGen/Generator/Basic.pm
Criterion Covered Total %
branch 78 86 90.7


line true false branch
23 0 32 unless $x > 0 and $y > 0
38 1022 2153 if ($$tile{'type'})
41 106 916 if ($$tile{'od'}{'e'} and $$tile{'od'}{'s'})
46 10 96 if ($$ur{'od'}{'s'} and $$ll{'od'}{'e'}) { }
19 77 elsif ((my $um = $ur)->{'od'}{'e'} and $$ll{'od'}{'e'}) { }
10 90 elsif ((my $ml = $ll)->{'od'}{'s'} and $$ur{'od'}{'s'}) { }
63 8 11 if ($$lm{'od'}{'e'} and $$ur{'od'}{'s'})
84 2 8 if ($$ll{'od'}{'e'} and $$mr{'od'}{'s'})
124 0 32 if $size[0] > $$opts{'x_size'}
125 0 32 if $size[1] > $$opts{'y_size'}
130 0 32 if exists $$opts{'t_cb'}
143 43519 78976 if (exists $$tile{'type'})
144 2280 41239 if $$tile{'type'} eq 'room'
146 38944 2295 if ($$tile{'type'} eq 'corridor') { }
2295 0 elsif ($$tile{'type'} eq 'pseudo') { }
158 679 4192 if ($pseudo)
160 746 10868 if (exists $$g{'_rd_all'})
162 217 529 if ($$g{'_rd_all'} == $$g{'lsize'}) { }
55 474 elsif ($$g{'lsize'} == 6 and $$g{'_rd_all'} == 4) { }
163 51 166 $$g{'lsize'} == 6 ? :
179 4328 543 if ($score > 0)
180 125 4203 if (not defined $lowest_score or $score < $lowest_score)
185 371 3957 if $score <= $lowest_score
194 30 2 if (my $loc = choice(@possible_locs))
211 119 577 if (exists $$tile{'type'})
212 119 0 if ($$tile{'type'} eq 'corridor' or $$tile{'type'} eq 'pseudo')
213 16 103 if $x == $xmin and $$tile{'od'}{'w'}
214 8 111 if $y == $ymin and $$tile{'od'}{'n'}
215 16 103 if $x == $xmax and $$tile{'od'}{'e'}
216 17 102 if $y == $ymax and $$tile{'od'}{'s'}
225 2735 49 if (my $n = $$tile{'nb'}{$dir})
236 130 21 if (my $west_n = $$west{'nb'}{'w'})
240 151 0 if (my $east_n = $$east{'nb'}{'e'})
249 113 28 if (my $north_n = $$north{'nb'}{'n'})
253 141 0 if (my $south_n = $$south{'nb'}{'s'})
279 97 30 if ($$_{'type'} eq 'pseudo')
290 49 453 if ($$tile{'type'} eq 'pseudo') { }
300 8 89 if ($intact)
302 20 18 if $$tile{'y'} > $ymin
303 20 18 if $$tile{'y'} < $ymax
304 21 17 if $$tile{'x'} < $xmax
305 21 17 if $$tile{'x'} > $xmin
311 49 696 if $$tile{'group'}{'type'} eq 'pseudo'