Branch Coverage

blib/lib/Games/Mines.pm
Criterion Covered Total %
branch 57 68 83.8


line true false branch
71 2 71 if ($count > $width * $height)
149 0 11 if ($mine_field->found_all and $$mine_field{'on'})
189 2 310 if $mine_field->_at($w, $h) eq '*'
191 0 0 if $$_[0] == $w
0 310 if grep {$$_[1] == $h if $$_[0] == $w;} @exclude
192 0 310 unless $mine_field->_check_mine_placement($w, $h)
197 0 55 unless ($mine_field->_check_mine_field)
215 93 72 if ($mine_field->shown($w, $h))
268 12 40 if $mine_field->shown($w, $h)
272 1 39 if ($mine_field->_at($w, $h) eq '*')
279 15 24 if ($mine_field->at($w, $h) eq ' ')
281 9 36 if $w + $dw < 0
282 3 33 if $w + $dw > $mine_field->width
285 15 84 if $dw == 0 and $dh == 0
286 19 65 if $h + $dh < 0
287 7 58 if $h + $dh > $mine_field->height
289 20 38 if $mine_field->shown($w + $dw, $h + $dh)
311 0 10 if $mine_field->shown($w, $h)
312 0 10 if $mine_field->flagged($w, $h)
332 0 2 if $mine_field->shown($w, $h)
333 0 2 unless $mine_field->flagged($w, $h)
354 3 26 if $mine_field->shown($w, $h)
382 4 19 if ($$mine_field{'flags'} + $$mine_field{'unknown'} == $$mine_field{'count'})
387 0 36 if ($mine_field->at($w, $h) eq 'F' and not $mine_field->_at($w, $h) eq '*')
417 2 3491 if ($w < 0) { }
544 2947 elsif ($w >= $mine_field->width) { }
424 2 3491 if ($h < 0) { }
510 2981 elsif ($h >= $mine_field->height) { }
480 1 947 if $w + $dw < 0
481 58 889 if $w + $dw > $mine_field->width
484 316 2351 if $dw == 0 and $dh == 0
485 115 2236 if $h + $dh < 0
486 176 2060 if $h + $dh > $mine_field->height
488 7 2053 if $mine_field->_at($w + $dw, $h + $dh) eq '*'