blib/lib/BalanceOfPower/Commands/MilitaryAid.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 2 SCAR 13.9
CC
2
Cov
0%
IA
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 4.0
1 package BalanceOfPower::Commands::MilitaryAid;
2 $BalanceOfPower::Commands::MilitaryAid::VERSION = '0.300010';
3 use Moo;
4 use BalanceOfPower::Constants ":all";
5  
6  
7 extends 'BalanceOfPower::Commands::TargetNation';
8  
9 sub IA
10 {
11 my $self = shift;
12 my $actor = $self->get_nation();
13  
14 my @friends = $self->world->shuffle("Choosing nation to military aid for " . $actor->name, $self->world->get_friends($actor->name));
15 for(@friends)
16 {
17 my $f = $_;
18 if($self->world->get_nation($f)->army < MINIMUM_ARMY_FOR_AID)
19 {
20 return "MILITARY AID FOR $f";
21 }
22 }
23 return undef;
24 }
25  
26 1;