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

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 19 CC 2 SCAR 15.4
CC
2
Cov
0%
IA
6.0
BEGIN
2.0
CRAP 4.7
1 package BalanceOfPower::Commands::EconomicAid;
2 $BalanceOfPower::Commands::EconomicAid::VERSION = '0.200000';
3 use Moo;
4  
5  
6 extends 'BalanceOfPower::Commands::TargetNation';
7  
8 sub IA
9 {
10 my $self = shift;
11 my $actor = $self->get_nation();
12  
13 my @hates = $self->world->get_hates($actor->name);
14 if(@hates)
15 {
16 #Minor hate is used
17 @hates = sort { $b->factor <=> $a->factor } @hates;
18 my $other = $hates[0]->destination($actor->name);
19 return "ECONOMIC AID FOR $other";
20 }
21 return undef;
22 }
23  
24 1;