Condition Coverage

blib/lib/Games/AIBots.pm
Criterion Covered Total %
condition 0 285 0.0


and 3 conditions

line !l l&&!r l&&r condition
252 0 0 0 $GUI and not defined $Running
358 0 0 0 $Arg[$_] and not $Arg[$_ - 1]
368 0 0 0 $Arg[0] && $sum >= 2
579 0 0 0 defined $Obj{$type} and $Obj{$type} ne 'space'
0 0 0 defined $Obj{$type} and $Obj{$type} ne 'space' and $type ne '='
608 0 0 0 $GUI and $Top->state eq 'normal'
624 0 0 0 $Games::AIBots::Mask and $onwatch
632 0 0 0 $Console and $onwatch
643 0 0 0 $nx == $ox and $ny == $oy
667 0 0 0 $x == $$bot{'x'} and $y == $$bot{'y'}
0 0 0 $x == $$bot{'enemy_x'} and $y == $$bot{'enemy_y'}
0 0 0 $x == $$bot{'friend_x'} and $y == $$bot{'friend_y'}
0 0 0 $x == $$bot{'bumped_x'} and $y == $$bot{'bumped_y'}
705 0 0 0 $$bot{'x'} == $x and $$bot{'y'} == $y
716 0 0 0 $bot and $$bot{'id'} == $$Watch{'id'} || $Console
722 0 0 0 $GUI and not @_
777 0 0 0 $$bot{'fuel'} < $Max_fuel and not $Tick / scalar(@Bots) % 5
778 0 0 0 $$bot{'ammo'} < $Max_ammo and not $Tick / scalar(@Bots) % 10
779 0 0 0 $$bot{'life'} < $Max_life and not $Tick / scalar(@Bots) % 15
798 0 0 0 $owner and $$owner{'id'} != $$bot{'id'}
0 0 0 $owner and $$owner{'id'} != $$bot{'id'} and not $$owner{'team'}
848 0 0 0 $$bot{'fuel'} >= $Weapon{$type}[$CostF] && $$bot{'ammo'} >= $Weapon{$type}[$CostA]
864 0 0 0 $$bot{'team'} && $$other{'team'} eq $$bot{'team'}
909 0 0 0 $$bot{'fuel'} > 0 and not $Tick / scalar(@Bots) % 10
916 0 0 0 $Console and $Mask
0 0 0 $Console and $Mask and $$bot{'id'} == $$Watch{'id'}
967 0 0 0 $GUI and $Running
978 0 0 0 bot_at(@{$missile;}{'x', 'y'}) and $$missile{'age'}
999 0 0 0 $$bot{'fuel'} >= $Cloak_fuel and bot_pay($bot, 'ammo', $Cloak_ammo)
1019 0 0 0 not $missiles and scalar keys %alive <= 1
1048 0 0 0 $Console and $^O ne 'MSWin32'
1312 0 0 0 $Obj{$type} and $Obj{$type} eq 'vault'
1332 0 0 0 $dx == 0 and $dy == 0
1380 0 0 0 $Console and !$Games::AIBots::Mask || $Bots[-1]{'dead'}
1385 0 0 0 $Console and $^O ne 'MSWin32'
1396 0 0 0 $Console and $_[1] eq 'destruct' || $_[0] eq 'hit' || $_[0] eq 'fire'
1427 0 0 0 $Games::AIBots::Mask and $Running
0 0 0 $Games::AIBots::Mask and $Running and not $Bots[-1]{'dead'}
1431 0 0 0 $key ge '0' and $key le '9'
0 0 0 not $Running and $Continue
1529 0 0 0 defined $key and exists $UserCmd{$key}
1534 0 0 0 $$bot{'enemy_x'} and $Console

or 2 conditions

line l !l condition
353 0 0 shift @_ || ''
579 0 0 $step || ''
790 0 0 $adj || 0
798 0 0 $adj || 0
1029 0 0 $$bot{'score'} || 0
1363 0 0 $dir ||= 'front'

or 3 conditions

line l !l&&r !l&&!r condition
579 0 0 0 $tag || "${x}:$y"
598 0 0 0 $x < 1 or $y < 1
0 0 0 $x < 1 or $y < 1 or $x > $Cols
0 0 0 $x < 1 or $y < 1 or $x > $Cols or $y > $Rows
638 0 0 0 not $Games::AIBots::Mask or $Bots[-1]{'dead'}
643 0 0 0 not $GUI or $nx == $ox and $ny == $oy
646 0 0 0 not $Buffer{$tag} or $Buffer{$tag} ne $Obj{$obj}
665 0 0 0 $Obj{$obj} eq 'flag' or $Obj{$obj} eq 'mine'
667 0 0 0 $x == $$bot{'x'} and $y == $$bot{'y'} or $x == $$bot{'enemy_x'} and $y == $$bot{'enemy_y'}
0 0 0 $x == $$bot{'x'} and $y == $$bot{'y'} or $x == $$bot{'enemy_x'} and $y == $$bot{'enemy_y'} or $x == $$bot{'friend_x'} and $y == $$bot{'friend_y'}
0 0 0 $x == $$bot{'x'} and $y == $$bot{'y'} or $x == $$bot{'enemy_x'} and $y == $$bot{'enemy_y'} or $x == $$bot{'friend_x'} and $y == $$bot{'friend_y'} or $x == $$bot{'bumped_x'} and $y == $$bot{'bumped_y'}
695 0 0 0 $Obj{$$bot{'pic'} . $obj} || "bot$obj"
716 0 0 0 $$bot{'id'} == $$Watch{'id'} || $Console
760 0 0 0 $$other{'id'} == $$bot{'id'} or $$other{'cloak'}
798 0 0 0 $owner and $$owner{'id'} != $$bot{'id'} and not $$owner{'team'} or $$owner{'team'} ne $$bot{'team'}
939 0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/
0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/ or /^(move)[\s\t]+(forward|backward)$/
0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/ or /^(move)[\s\t]+(forward|backward)$/ or /^(fire)[\s\t]+(laser|bazooka|energy)$/
0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/ or /^(move)[\s\t]+(forward|backward)$/ or /^(fire)[\s\t]+(laser|bazooka|energy)$/ or /^(fire)[\s\t]+(grenade)([\s\t]+[\d\'\"]+)?$/
0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/ or /^(move)[\s\t]+(forward|backward)$/ or /^(fire)[\s\t]+(laser|bazooka|energy)$/ or /^(fire)[\s\t]+(grenade)([\s\t]+[\d\'\"]+)?$/ or /^(scan)[\s\t]+(gps)[\s\t]+(\d+)[\s\t]*,[\s\t]*(\d+)$/
0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/ or /^(move)[\s\t]+(forward|backward)$/ or /^(fire)[\s\t]+(laser|bazooka|energy)$/ or /^(fire)[\s\t]+(grenade)([\s\t]+[\d\'\"]+)?$/ or /^(scan)[\s\t]+(gps)[\s\t]+(\d+)[\s\t]*,[\s\t]*(\d+)$/ or /^(scan)[\s\t]+(position|relative) ([12346789])$/
0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/ or /^(move)[\s\t]+(forward|backward)$/ or /^(fire)[\s\t]+(laser|bazooka|energy)$/ or /^(fire)[\s\t]+(grenade)([\s\t]+[\d\'\"]+)?$/ or /^(scan)[\s\t]+(gps)[\s\t]+(\d+)[\s\t]*,[\s\t]*(\d+)$/ or /^(scan)[\s\t]+(position|relative) ([12346789])$/ or /^(disable)[\s\t]+(shield|laymine|cloak)$/
0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/ or /^(move)[\s\t]+(forward|backward)$/ or /^(fire)[\s\t]+(laser|bazooka|energy)$/ or /^(fire)[\s\t]+(grenade)([\s\t]+[\d\'\"]+)?$/ or /^(scan)[\s\t]+(gps)[\s\t]+(\d+)[\s\t]*,[\s\t]*(\d+)$/ or /^(scan)[\s\t]+(position|relative) ([12346789])$/ or /^(disable)[\s\t]+(shield|laymine|cloak)$/ or /^(enable)[\s\t]+(shield|laymine|cloak)$/
0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/ or /^(move)[\s\t]+(forward|backward)$/ or /^(fire)[\s\t]+(laser|bazooka|energy)$/ or /^(fire)[\s\t]+(grenade)([\s\t]+[\d\'\"]+)?$/ or /^(scan)[\s\t]+(gps)[\s\t]+(\d+)[\s\t]*,[\s\t]*(\d+)$/ or /^(scan)[\s\t]+(position|relative) ([12346789])$/ or /^(disable)[\s\t]+(shield|laymine|cloak)$/ or /^(enable)[\s\t]+(shield|laymine|cloak)$/ or /^(attempt)[\s\t]+(repair|destruct)$/
0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/ or /^(move)[\s\t]+(forward|backward)$/ or /^(fire)[\s\t]+(laser|bazooka|energy)$/ or /^(fire)[\s\t]+(grenade)([\s\t]+[\d\'\"]+)?$/ or /^(scan)[\s\t]+(gps)[\s\t]+(\d+)[\s\t]*,[\s\t]*(\d+)$/ or /^(scan)[\s\t]+(position|relative) ([12346789])$/ or /^(disable)[\s\t]+(shield|laymine|cloak)$/ or /^(enable)[\s\t]+(shield|laymine|cloak)$/ or /^(attempt)[\s\t]+(repair|destruct)$/ or /^(beam)[\s\t]+(command|fuel|ammo)\s+(.+)$/
0 0 0 /^(scan)[\s\t]+(longrange|front|right|left|perimeter|cross|corner)$/ or /^(turn)[\s\t]+(left|right)$/ or /^(move)[\s\t]+(forward|backward)$/ or /^(fire)[\s\t]+(laser|bazooka|energy)$/ or /^(fire)[\s\t]+(grenade)([\s\t]+[\d\'\"]+)?$/ or /^(scan)[\s\t]+(gps)[\s\t]+(\d+)[\s\t]*,[\s\t]*(\d+)$/ or /^(scan)[\s\t]+(position|relative) ([12346789])$/ or /^(disable)[\s\t]+(shield|laymine|cloak)$/ or /^(enable)[\s\t]+(shield|laymine|cloak)$/ or /^(attempt)[\s\t]+(repair|destruct)$/ or /^(beam)[\s\t]+(command|fuel|ammo)\s+(.+)$/ or /^(toggle)[\s\t]+(shield|laymine|cloak)$/
978 0 0 0 bot_at(@{$missile;}{'x', 'y'}) and $$missile{'age'} or obj_at($$missile{'x'} += $dx, $$missile{'y'} += $dy) ne '.'
0 0 0 bot_at(@{$missile;}{'x', 'y'}) and $$missile{'age'} or obj_at($$missile{'x'} += $dx, $$missile{'y'} += $dy) ne '.' or ++$$missile{'age'} >= $$missile{'range'}
1012 0 0 0 $$bot{'team'} or bot_id($bot)
1013 0 0 0 $$bot{'dead'} or $$bot{'fuel'} <= 0
1019 0 0 0 not $missiles and scalar keys %alive <= 1 or not $hasfuel
1027 0 0 0 $$bot{'team'} or bot_id($bot)
0 0 0 $$bot{'dead'} or scalar keys %alive > 1
1029 0 0 0 $$bot{'team'} or bot_id($bot)
1067 0 0 0 $$bot{'shield'} or $$bot{'life'} >= $Max_life
1101 0 0 0 $type eq 'fuel' or $type eq 'ammo'
1145 0 0 0 $type eq 'bazooka' or $type eq 'grenade'
1157 0 0 0 $range || ($Cols > $Rows ? $Cols : $Rows)
1174 0 0 0 $$bot{'h'} == 8 || $$bot{'h'} == 2
1227 0 0 0 $type eq 'position' or $type eq 'relative'
1347 0 0 0 $obj eq 'flag' or $obj eq 'mine'
0 0 0 $obj eq 'flag' or $obj eq 'mine' or $obj eq 'fence'
1350 0 0 0 $obj eq 'flag' or $obj eq 'mine'
1380 0 0 0 !$Games::AIBots::Mask || $Bots[-1]{'dead'}
1396 0 0 0 $_[1] eq 'destruct' || $_[0] eq 'hit' || $_[0] eq 'fire'
1428 0 0 0 $Running || $Continue
0 0 0 my $key = Term::ReadKey::ReadKey($Running || $Continue ? -1 : 10) or $Continue
1431 0 0 0 $key eq ' ' or $key eq 'p'
0 0 0 $key eq ' ' or $key eq 'p' or not $Running and $Continue