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

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
select_message
2.0
get_available_targets
2.0
BEGIN
2.0
CRAP 2.0
1 package BalanceOfPower::Commands::TargetRoute;
2 $BalanceOfPower::Commands::TargetRoute::VERSION = '0.300010';
3 use Moo;
4 use Data::Dumper;
5  
6 extends 'BalanceOfPower::Commands::TargetNation';
7  
8 sub select_message
9 {
10 my $self = shift;
11 my $message = "";
12 foreach my $tr ($self->world->routes_for_node($self->actor))
13 {
14 $message .= $tr->print($self->actor) . "\n";
15 }
16 $message .= "\n";
17 $message .= "Select traderoute:\n";
18 return $message;
19 }
20  
21 sub get_available_targets
22 {
23 my $self = shift;
24 return $self->world->route_destinations_for_node($self->actor);
25 }
26  
27  
28  
29 1;
30