Branch Coverage

blib/lib/Games/Maze.pm
Criterion Covered Total %
branch 177 226 78.3


line true false branch
134 7 0 @_ > 1 ? :
7 1 @_ ? :
137 2 6 if @{$args->{'dimensions'};} < 1
138 2 6 if @{$args->{'dimensions'};} < 2
139 3 5 if @{$args->{'dimensions'};} < 3
213 0 8 unless exists $self->{'form'}
217 0 8 unless $self->_set_internals
273 0 8 if $self->{'_status'} ne 'reset'
282 1076 972 if (@dir > 0) { }
288 964 112 if @dir > 1
296 0 1076 if $Debug_make_vx
297 0 1076 if $Debug_make_ascii
301 8 964 if @queue == 0
323 0 6 if $self->{'_status'} ne 'make'
324 0 6 unless $self
341 748 2128 if $self->_wall_open($dir, $c, $r, $l)
349 96 652 if ($self->_on_pathmark($cc, $rr, $ll)) { }
360 0 748 if $Debug_solve_vx
361 0 748 if $Debug_solve_ascii
379 0 6 if $self->{'_status'} eq 'make'
381 6 0 if ($self->{'_status'} eq 'solve') { }
441 0 10 wantarray ? :
669 0 3 wantarray ? :
687 2 0 if ($self->{'form'} eq 'Rectangle') { }
689 0 2 if ($cols < 2 or $rows < 2 or $lvls < 1)
707 1 1 if (defined $self->{'start'})
711 0 1 if (not defined $start[0] or $start[0] < 1 or $start[0] > $self->{'_cols'})
717 0 1 if (not defined $start[1] or $start[1] < 1 or $start[1] > $self->{'_rows'})
723 0 1 if (not defined $start[2] or $start[2] < 1 or $start[2] > $self->{'_rows'})
776 1 1 if (defined $self->{'entry'}) { }
780 0 1 if ($entry[0] < 1 or $entry[0] > $self->{'_cols'})
796 1 1 if (defined $self->{'exit'}) { }
800 0 1 if ($exit[0] < 1 or $exit[0] > $self->{'_cols'})
829 1 1 if defined $self->{'start'}
851 0 362 if $Debug_internal
853 298 64 if ($dir == $Games::Maze::North or $dir == $Games::Maze::South) { }
59 5 elsif ($dir == $Games::Maze::East or $dir == $Games::Maze::West) { }
855 145 153 $dir == $Games::Maze::North ? :
859 13 46 $dir == $Games::Maze::West ? :
863 1 4 $dir == $Games::Maze::Ceiling ? :
866 159 203 $dir <= $Games::Maze::Ceiling ? :
868 0 362 if $Debug_internal
889 105 377 if $m->[$l][$r - 1][$c] == 0
890 19 463 if $m->[$l][$r][$c - 1] == 0
891 117 365 if $m->[$l][$r + 1][$c] == 0
892 219 263 if $m->[$l][$r][$c + 1] == 0
893 70 412 if $$m[$l - 1][$r][$c] == 0
894 99 383 if $$m[$l + 1][$r][$c] == 0
896 0 482 if $Debug_internal
910 0 303 if $Debug_internal
911 41 262 if ($dir == $Games::Maze::Floor) { }
60 202 elsif ($dir == $Games::Maze::Ceiling) { }
923 0 303 if $Debug_internal
993 165 168 if ($self->_up_column($c)) { }
1019 1689 1689 if ($self->_up_column($c)) { }
1036 1689 1689 if ($self->_up_column($c)) { }
1052 0 15 wantarray ? :
1070 2 4 if ($self->{'form'} eq 'Rectangle') { }
4 0 elsif ($self->{'form'} eq 'Hexagon') { }
1072 0 2 if ($cols < 2 or $rows < 2 or $lvls < 1)
1078 0 2 unless defined $self->{'upcolumn_even'}
1085 0 4 if ($cols < 2 or $rows < 1 or $lvls < 1)
1105 5 1 if (defined $self->{'start'})
1109 0 5 if (not defined $start[0] or $start[0] < 1 or $start[0] > $self->{'_cols'})
1115 0 5 if (not defined $start[1] or $start[1] < 1 or $start[1] > $self->{'_rows'})
1123 0 4 if (not defined $start[2] or $start[2] < 1 or $start[2] > $self->{'_rows'})
1148 2 4 if ($self->{'form'} eq 'Rectangle') { }
4 0 elsif ($self->{'form'} eq 'Hexagon') { }
1158 12 12 if ($self->_up_column($c)) { }
1182 1 1 if ($self->_up_column(1)) { }
1194 1 1 if ($self->_up_column($self->{'_cols'} + 1)) { }
1217 2 2 if ($self->_up_column($self->{'_cols'} + 1)) { }
1293 5 1 if (defined $self->{'entry'}) { }
1297 0 5 if ($entry[0] < 1 or $entry[0] > $self->{'_cols'})
1318 5 1 if (defined $self->{'exit'}) { }
1322 0 5 if ($exit[0] < 1 or $exit[0] > $self->{'_cols'})
1355 5 1 if defined $self->{'start'}
1380 0 1462 if $Debug_internal
1381 821 641 if ($dir == $Games::Maze::North or $dir == $Games::Maze::South) { }
29 612 elsif ($dir == $Games::Maze::Ceiling or $dir == $Games::Maze::Floor) { }
1383 473 348 $dir == $Games::Maze::North ? :
1387 11 18 $dir == $Games::Maze::Ceiling ? :
1391 304 308 if ($self->_up_column($c)) { }
1393 28 276 if $dir == $Games::Maze::NorthWest or $dir == $Games::Maze::NorthEast
1397 190 118 if $dir == $Games::Maze::SouthWest or $dir == $Games::Maze::SouthEast
1400 254 358 if ($dir == $Games::Maze::NorthWest or $dir == $Games::Maze::SouthWest) { }
358 0 elsif ($dir == $Games::Maze::NorthEast or $dir == $Games::Maze::SouthEast) { }
1410 738 724 $dir <= $Games::Maze::Ceiling ? :
1412 0 1462 if $Debug_internal
1433 317 1249 if $m->[$l][$r - 1][$c] == 0
1435 774 792 if ($self->_up_column($c)) { }
1437 9 765 if $m->[$l][$r - 1][$c - 1] == 0
1438 79 695 if $m->[$l][$r][$c - 1] == 0
1440 151 623 if $m->[$l][$r + 1][$c] == 0
1442 330 444 if $m->[$l][$r][$c + 1] == 0
1443 259 515 if $m->[$l][$r - 1][$c + 1] == 0
1447 43 749 if $m->[$l][$r][$c - 1] == 0
1448 83 709 if $m->[$l][$r + 1][$c - 1] == 0
1450 243 549 if $m->[$l][$r + 1][$c] == 0
1452 331 461 if $m->[$l][$r + 1][$c + 1] == 0
1453 299 493 if $m->[$l][$r][$c + 1] == 0
1456 294 1272 if $$m[$l - 1][$r][$c] == 0
1457 42 1524 if $$m[$l + 1][$r][$c] == 0
1459 0 1566 if $Debug_internal
1473 0 2573 if $Debug_internal
1474 319 2254 if ($dir == $Games::Maze::Floor) { }
367 1887 elsif ($dir == $Games::Maze::NorthWest) { }
276 1611 elsif ($dir == $Games::Maze::SouthEast) { }
1490 0 2573 if $Debug_internal
1517 0 0 if ($self->{'form'} eq 'Hexagon') { }
1523 0 0 if ($r <= $ante_r) { }
0 0 elsif ($r > $post_r) { }
1559 57 4 if ($self->{'form'} eq 'Hexagon') { }