Branch Coverage

blib/lib/Chess/Board.pm
Criterion Covered Total %
branch 58 84 69.0


line true false branch
223 48 48 $y % 2 ? :
227 192 192 $color eq 'light' ? :
230 192 192 $color eq 'light' ? :
239 8 9668 if $i == -1
251 0 500 unless $r_board_arr
257 14703 17297 if defined $piece and $piece->can('clone')
270 269 0 if defined $caller and $$caller >= 0
276 0 83430 unless ('Chess::Board'->square_is_valid($sq))
300 3 0 if (defined $x and defined $y) { }
311 0 22965 unless defined $x and defined $y
313 980 21985 unless $x >= 0 and $x <= 7
321 0 23068 unless defined $x and defined $y
323 976 22092 unless $y >= 0 and $y <= 7
368 0 2971 unless $hdist == 0 or $vdist == 0 or $hdist == $vdist
369 1316 3985 unless $hdist or $vdist
370 2971 1014 $hdist ? :
371 2963 1022 $vdist ? :
375 1014 2971 if ($vdist and $hdelta == 0) { }
1022 1949 elsif ($hdist and $vdelta == 0) { }
1949 0 elsif ($hdist == $vdist) { }
377 7098 0 $vdelta > 0 ? :
384 7154 0 $hdelta > 0 ? :
391 3116 3087 $hdelta > 0 ? :
393 2572 3631 $vdelta > 0 ? :
403 0 7822 unless ('Chess::Board'->square_is_valid($sq))
408 0 7822 unless ref $self
409 0 7822 if $$self == -1
411 0 7822 unless defined $r_board_arr
417 0 1070 unless ('Chess::Board'->square_is_valid($sq))
422 0 1070 unless ref $self
423 0 1070 if ($$self == -1)
428 0 1070 unless defined $r_board_arr
434 0 281 unless ('Chess::Board'->square_is_valid($sq1) and 'Chess::Board'->square_is_valid($sq2))
438 0 281 unless ref $self
439 0 281 if $$self == -1
444 0 161 unless $hdist == 0 or $vdist == 0 or $hdist == $vdist
445 161 120 $hdist ? :
446 242 39 $vdist ? :
450 0 281 unless defined $r_board_arr
451 0 281 if ($hdist == 0 and $hdist == $vdist)
452 0 0 if defined $$r_board_arr[$ycurr][$xcurr]{'piece'}
456 135 522 if defined $$r_board_arr[$ycurr][$xcurr]{'piece'}