Condition Coverage

blib/lib/Games/Chess.pm
Criterion Covered Total %
condition 21 38 55.2


and 3 conditions

line !l l&&!r l&&r condition
87 0 0 425 $move =~ /^[0-9]+$/ and $move > 0
93 0 0 284 1 <= $piece and $piece <= 6
105 96 104 3254 0 <= $x and $x < 8
200 2 3252 0 <= $x and $x < 8 and 0 <= $y
106 0 3252 0 <= $x and $x < 8 and 0 <= $y and $y < 8
129 0 0 2628 0 <= $val and $val < 256
0 0 2628 0 <= $val and $val < 256 and $val == int $val
193 0 0 0 &xy_valid($xs, $ys) and &xy_valid($xd, $yd)
248 2 23 0 defined $val and UNIVERSAL::isa($val, 'Games::Chess::Position')
516 81 84 91 $sq eq ' ' and ($y + $_) % 2 == 0

or 2 conditions

line l !l condition
505 4 1 join('', sort(keys %{$$self{'can_castle'};})) || '-'

or 3 conditions

line l !l&&r !l&&!r condition
57 146 146 0 $colour == 1 or $colour == 2
211 0 0 0 $$a{'from'}[0] <=> $$b{'from'}[0] || $$a{'from'}[1] <=> $$b{'from'}[1] || $$a{'to'}[0] <=> $$b{'to'}[0] || $$a{'to'}[1] <=> $$b{'to'}[1] || do { my $ap = $$a{'promotion'}; my $bp = $$b{'promotion'}; defined $ap ? defined $bp ? $$ap <=> $$bp : -1 : 1 }