Branch Coverage

blib/lib/Games/Roguelike/Caves.pm
Criterion Covered Total %
branch 34 42 80.9


line true false branch
24 0 1 unless $w and $h
27 0 1 if $percentWalls > 1
28 1 0 unless defined $wall
29 1 0 unless defined $floor
35 446 554 rand() < $percentWalls ? :
41 804 10368 if (not $x && $y or $x == $w - 1 or $y == $h - 1)
57 4221 6147 $c > 4 ? :
69 494 506 $terrain[$y][$x] ? :
80 0 1 unless $h
82 0 1 unless $w
83 1 0 unless defined $floor
84 1 0 unless defined $wall
89 506 494 if $$terrain[$y][$x] eq $floor
91 58 436 if $$terrain[$y][$x - 1] eq $floor
92 58 436 if $$terrain[$y][$x + 1] eq $floor
93 65 429 if $$terrain[$y - 1][$x] eq $floor
94 65 429 if $$terrain[$y + 1][$x] eq $floor
95 57 437 if ($h > $v) { }
43 394 elsif ($v > $h) { }
73 321 elsif ($v) { }
105 39 248 if ($$terrain[$y - 1][$x - 1] eq $floor or $$terrain[$y - 1][$x + 1] eq $floor or $$terrain[$y + 1][$x - 1] eq $floor or $$terrain[$y + 1][$x + 1] eq $floor)