Condition Coverage

blib/lib/Chess/Rep.pm
Criterion Covered Total %
condition 63 143 44.0


and 3 conditions

line !l l&&!r l&&r condition
649 0 6 0 $tpmove and @$tpmove
661 0 0 0 defined $row and $row == $t_row
0 0 0 defined $col and $col == $t_col
676 0 0 6 defined $from_index and grep(($_ == $from_index), @$tpmove)
702 0 0 0 $from_index == 4 and $to_index == 6
0 0 0 $from_index == 116 and $to_index == 118
0 0 0 $from_index == 4 and $to_index == 2
0 0 0 $from_index == 116 and $to_index == 114
727 0 2 0 $from_col != $to_col and $prev_enpa
2 0 0 $from_col != $to_col and $prev_enpa and $prev_enpa == $to_index
762 4 0 2 $is_pawn and $is_capture
773 4 0 1 $is_pawn && $is_capture
1 1 4 $ambiguous and not $is_pawn && $is_capture
774 1 2 1 $rank_ambiguous and $file_ambiguous
917 13 0 0 $$self{'in_check'} && !@all_moves
962 6303 0 0 $$self{'enpa'} and $piece & 1
6303 0 0 $$self{'enpa'} and $piece & 1 and $to == $$self{'enpa'}
0 0 0 $$self{'enpa'} and $piece & 1 and $to == $$self{'enpa'} and $i == ($from & 112 | $to & 7)
979 6654 961 400 $p and $p & $type
7615 395 5 $p and $p & $type and ($p & 128) == $opponent_color
1047 342 38 5 $p & 4 and $self->is_attacked($to)
1054 29 0 0 $$self{'enpa'} and $to == $$self{'enpa'}
1066 4 3 0 $p & 1 and ($from & 7) == ($to & 7)
1083 1 5 14 defined $self->_add_if_valid($moves, $index, $index + $step) and $not_moved
1140 17 0 11 $step == 1 and not $$self{'in_check'}
17 11 0 $step == 1 and not $$self{'in_check'} and $self->can_castle($color, 0)
11 0 0 $step == 1 and not $$self{'in_check'} and $self->can_castle($color, 0) and not $self->get_piece_at_index($index + 1)
11 0 0 $step == 1 and not $$self{'in_check'} and $self->can_castle($color, 0) and not $self->get_piece_at_index($index + 1) and not $self->get_piece_at_index($index + 2)
28 0 0 $step == -1 and not $$self{'in_check'}
28 0 0 $step == -1 and not $$self{'in_check'} and $self->can_castle($color, 1)
0 0 0 $step == -1 and not $$self{'in_check'} and $self->can_castle($color, 1) and not $self->get_piece_at_index($index - 1)
0 0 0 $step == -1 and not $$self{'in_check'} and $self->can_castle($color, 1) and not $self->get_piece_at_index($index - 1) and not $self->get_piece_at_index($index - 2)
0 0 0 $step == -1 and not $$self{'in_check'} and $self->can_castle($color, 1) and not $self->get_piece_at_index($index - 1) and not $self->get_piece_at_index($index - 2) and not $self->get_piece_at_index($index - 3)

or 2 conditions

line l !l condition
238 0 1 $fen || 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'
335 0 0 $c || '-'
908 54 240 $type_moves{$to} ||= {}
909 30 264 $$a{$piece} ||= []
1079 0 20 $moves ||= []
1094 0 3 $moves ||= []
1103 12 6 $moves ||= []
1115 12 2 $moves ||= []
1127 0 12 $moves ||= []
1135 0 13 $moves ||= []

or 3 conditions

line l !l&&r !l&&!r condition
744 0 2 4 $is_capture ||= $tmp
752 2 0 4 $is_pawn || $is_capture
827 0 0 6 $from == 0 or $to == 0
830 0 0 6 $from == 112 or $to == 112
833 0 0 6 $from == 7 or $to == 7
836 0 0 6 $from == 119 or $to == 119
839 0 6 0 $promote || $p
917 0 13 0 $$self{'in_check'} || @all_moves