| 1 | package BalanceOfPower::Nation::Role::IA; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 11 | $BalanceOfPower::Nation::Role::IA::VERSION = '0.200000'; | |||||||||||||||||||||||||||||||||||||||||
| 3 | 11 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 11 | ▶ | use v5.10; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 11 | ▶ | use Moo::Role; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 11 | ▶ | use Array::Utils qw(intersect); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 11 | ▶ | use BalanceOfPower::Constants ':all'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 11 | ▶ | use BalanceOfPower::Utils qw( prev_turn ); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | 11 | has executive => ( | |||||||||||||||||||||||||||||||||||||||||
| 12 | is => 'rw', | ||||||||||||||||||||||||||||||||||||||||||
| 13 | handles => { decide => 'decide' } | ||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||
| 17 | sub decision | ||||||||||||||||||||||||||||||||||||||||||
| 18 | { | ||||||||||||||||||||||||||||||||||||||||||
| 19 | 64 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
decision: called CC=8 SCAR=20.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 20 | 64 | my $world = shift; | |||||||||||||||||||||||||||||||||||||||||
| 21 | 64 | my @advisors; | |||||||||||||||||||||||||||||||||||||||||
| 22 | 64 | ▶ | if($world->at_war($self->name) || $world->at_civil_war($self->name)) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$world->at_war($self->name) or $world->at_civil_war($self->name)
MC/DC100%2/2
$world->at_war($self->name) or $world->at_civil_war($self->name)
$world->at_war($self->name)
$world->at_civil_war($self->name)
Truth table100%3/3
A or B
A= $world->at_war($self->name)B= $world->at_civil_war($self->name)
| |||||||||||||||||||||||||||||||||||||||||||
| 23 | { | ||||||||||||||||||||||||||||||||||||||||||
| 24 | 9 | @advisors = ('military'); | |||||||||||||||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||||||||||||||||
| 26 | else | ||||||||||||||||||||||||||||||||||||||||||
| 27 | { | ||||||||||||||||||||||||||||||||||||||||||
| 28 | 55 | @advisors = ('domestic', 'economy', 'military'); | |||||||||||||||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||||||||||||||||
| 30 | 64 | @advisors = $world->shuffle("Choosing advisor for ".$self->name, @advisors); | |||||||||||||||||||||||||||||||||||||||||
| 31 | 64 | foreach my $a (@advisors) | |||||||||||||||||||||||||||||||||||||||||
| 32 | { | ||||||||||||||||||||||||||||||||||||||||||
| 33 | 73 | my $decision = undef; | |||||||||||||||||||||||||||||||||||||||||
| 34 | 73 | ▶ | if($a eq 'domestic') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 35 | { | ||||||||||||||||||||||||||||||||||||||||||
| 36 | 21 | $decision = $self->domestic_advisor(); | |||||||||||||||||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||||||||||||||||
| 38 | elsif($a eq 'economy') | ||||||||||||||||||||||||||||||||||||||||||
| 39 | { | ||||||||||||||||||||||||||||||||||||||||||
| 40 | 14 | $decision = $self->economy_advisor(); | |||||||||||||||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||||||||||||||||
| 42 | elsif($a eq 'military') | ||||||||||||||||||||||||||||||||||||||||||
| 43 | { | ||||||||||||||||||||||||||||||||||||||||||
| 44 | 24 | $decision = $self->military_advisor(); | |||||||||||||||||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||||||||||||||||
| 46 | 73 | ▶ | return $self->name . ": " . $decision if($decision); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||||||||||||||||
| 48 | 16 | return undef; | |||||||||||||||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||
| 51 | sub advisor | ||||||||||||||||||||||||||||||||||||||||||
| 52 | { | ||||||||||||||||||||||||||||||||||||||||||
| 53 | 59 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
advisor: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 54 | 59 | my @orders = @_; | |||||||||||||||||||||||||||||||||||||||||
| 55 | 59 | my $order = undef; | |||||||||||||||||||||||||||||||||||||||||
| 56 | 59 | for(@orders) | |||||||||||||||||||||||||||||||||||||||||
| 57 | { | ||||||||||||||||||||||||||||||||||||||||||
| 58 | 224 | $order = $self->decide($_); | |||||||||||||||||||||||||||||||||||||||||
| 59 | 224 | ▶ | return $order if $order; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||||||||||||||||
| 61 | 11 | return undef; | |||||||||||||||||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||
| 64 | sub domestic_advisor | ||||||||||||||||||||||||||||||||||||||||||
| 65 | { | ||||||||||||||||||||||||||||||||||||||||||
| 66 | 21 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
domestic_advisor: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 67 | 21 | return $self->advisor("LOWER DISORDER", | |||||||||||||||||||||||||||||||||||||||||
| 68 | "BOOST PRODUCTION", | ||||||||||||||||||||||||||||||||||||||||||
| 69 | "TREATY NAG WITH", | ||||||||||||||||||||||||||||||||||||||||||
| 70 | "DIPLOMATIC PRESSURE ON", | ||||||||||||||||||||||||||||||||||||||||||
| 71 | "MILITARY AID FOR", | ||||||||||||||||||||||||||||||||||||||||||
| 72 | "PROGRESS"); | ||||||||||||||||||||||||||||||||||||||||||
| 73 | } | ||||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | sub economy_advisor | ||||||||||||||||||||||||||||||||||||||||||
| 76 | { | ||||||||||||||||||||||||||||||||||||||||||
| 77 | 14 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
economy_advisor: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 78 | 14 | return $self->advisor("TREATY COM WITH", | |||||||||||||||||||||||||||||||||||||||||
| 79 | "DELETE TRADEROUTE", | ||||||||||||||||||||||||||||||||||||||||||
| 80 | "ADD ROUTE", | ||||||||||||||||||||||||||||||||||||||||||
| 81 | "ECONOMIC AID"); | ||||||||||||||||||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||
| 84 | sub military_advisor | ||||||||||||||||||||||||||||||||||||||||||
| 85 | { | ||||||||||||||||||||||||||||||||||||||||||
| 86 | 24 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
military_advisor: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 87 | 24 | return $self->advisor("DECLARE WAR TO", | |||||||||||||||||||||||||||||||||||||||||
| 88 | "AID INSURGENTS IN", | ||||||||||||||||||||||||||||||||||||||||||
| 89 | "MILITARY SUPPORT", | ||||||||||||||||||||||||||||||||||||||||||
| 90 | "REBEL MILITARY SUPPORT", | ||||||||||||||||||||||||||||||||||||||||||
| 91 | "RECALL MILITARY SUPPORT", | ||||||||||||||||||||||||||||||||||||||||||
| 92 | "BUILD TROOPS"); | ||||||||||||||||||||||||||||||||||||||||||
| 93 | } | ||||||||||||||||||||||||||||||||||||||||||
| 94 | sub accept_military_support | ||||||||||||||||||||||||||||||||||||||||||
| 95 | { | ||||||||||||||||||||||||||||||||||||||||||
| 96 | 4 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
accept_military_support: called CC=5 SCAR=22.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 97 | 4 | my $other = shift; | |||||||||||||||||||||||||||||||||||||||||
| 98 | 4 | my $world = shift; | |||||||||||||||||||||||||||||||||||||||||
| 99 | 4 | ▶ | if($world->already_in_military_support($self->name)) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 100 | { | ||||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | my $supd = $world->supported($self->name); | |||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | ▶ | if($supd && $supd->node1 eq $other) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$supd and $supd->node1 eq $other
MC/DC0%0/2
$supd and $supd->node1 eq $other
$supd
$supd->node1 eq $other
Truth table0%0/3
A and B
A= $supdB= $supd->node1 eq $other
| |||||||||||||||||||||||||||||||||||||||||||
| 103 | { | ||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||||||||||||||||
| 106 | else | ||||||||||||||||||||||||||||||||||||||||||
| 107 | { | ||||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||||||
| 111 | 4 | ▶ | return 0 if($world->diplomacy_status($self->name, $other) eq 'HATE'); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 112 | 4 | return $self->army < ARMY_TO_ACCEPT_MILITARY_SUPPORT; | |||||||||||||||||||||||||||||||||||||||||
| 113 | } | ||||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||||
| 115 | sub good_prey | ||||||||||||||||||||||||||||||||||||||||||
| 116 | { | ||||||||||||||||||||||||||||||||||||||||||
| 117 | 19 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
good_prey: called CC=18 SCAR=36.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 118 | 19 | my $enemy = shift; | |||||||||||||||||||||||||||||||||||||||||
| 119 | 19 | my $world = shift; | |||||||||||||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||||||||||||
| 121 | 19 | my $crisis = $world->crisis_exists($self->name, $enemy->name); | |||||||||||||||||||||||||||||||||||||||||
| 122 | 19 | ▶ | my $level = $crisis ? $crisis->get_crisis_level : ALLY_CONFLICT_LEVEL_FOR_INVOLVEMENT; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||
| 124 | 19 | ▶ | if($self->army < MIN_ARMY_FOR_WAR) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 125 | { | ||||||||||||||||||||||||||||||||||||||||||
| 126 | 16 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||||||||||||||||
| 128 | 3 | my $war_points = 0; | |||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||
| 130 | #ARMY EVALUATION | ||||||||||||||||||||||||||||||||||||||||||
| 131 | 3 | my $army_ratio; | |||||||||||||||||||||||||||||||||||||||||
| 132 | 3 | ▶ | if($enemy->army > 0) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 133 | { | ||||||||||||||||||||||||||||||||||||||||||
| 134 | 1 | $army_ratio = int($self->army / $enemy->army); | |||||||||||||||||||||||||||||||||||||||||
| 135 | } | ||||||||||||||||||||||||||||||||||||||||||
| 136 | else | ||||||||||||||||||||||||||||||||||||||||||
| 137 | { | ||||||||||||||||||||||||||||||||||||||||||
| 138 | 2 | $army_ratio = 3; | |||||||||||||||||||||||||||||||||||||||||
| 139 | } | ||||||||||||||||||||||||||||||||||||||||||
| 140 | 3 | ▶ | if($army_ratio < 1) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 141 | { | ||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | my $reverse_army_ratio = $enemy->army / $self->army; | |||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | ▶ | if($reverse_army_ratio > MIN_INFERIOR_ARMY_RATIO_FOR_WAR) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 144 | { | ||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 146 | } | ||||||||||||||||||||||||||||||||||||||||||
| 147 | else | ||||||||||||||||||||||||||||||||||||||||||
| 148 | { | ||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | $army_ratio = -1; | |||||||||||||||||||||||||||||||||||||||||
| 150 | } | ||||||||||||||||||||||||||||||||||||||||||
| 151 | } | ||||||||||||||||||||||||||||||||||||||||||
| 152 | 3 | $war_points += $army_ratio; | |||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||
| 154 | #INTERNAL EVALUATION | ||||||||||||||||||||||||||||||||||||||||||
| 155 | 3 | ▶ | if($self->internal_disorder_status eq 'Peace') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 156 | { | ||||||||||||||||||||||||||||||||||||||||||
| 157 | 3 | $war_points += 1; | |||||||||||||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||||||||||||
| 159 | elsif($self->internal_disorder_status eq 'Terrorism') | ||||||||||||||||||||||||||||||||||||||||||
| 160 | { | ||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | $war_points += 0; | |||||||||||||||||||||||||||||||||||||||||
| 162 | } | ||||||||||||||||||||||||||||||||||||||||||
| 163 | elsif($self->internal_disorder_status eq 'Insurgence') | ||||||||||||||||||||||||||||||||||||||||||
| 164 | { | ||||||||||||||||||||||||||||||||||||||||||
| 165 | 0 | $war_points += -1; | |||||||||||||||||||||||||||||||||||||||||
| 166 | } | ||||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||
| 168 | #WEALTH EVALUATION/PROGRES EVALUATION | ||||||||||||||||||||||||||||||||||||||||||
| 169 | 3 | my $wealth = $world->get_statistics_value(prev_turn($self->current_year), $self->name, 'wealth'); | |||||||||||||||||||||||||||||||||||||||||
| 170 | 3 | my $enemy_wealth = $world->get_statistics_value(prev_turn($self->current_year), $enemy->name, 'wealth'); | |||||||||||||||||||||||||||||||||||||||||
| 171 | 3 | my $progress_delta = $enemy->progress - $self->progress; | |||||||||||||||||||||||||||||||||||||||||
| 172 | 3 | ▶ | if($wealth && $enemy_wealth) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$wealth and $enemy_wealth
MC/DC50%1/2
$wealth and $enemy_wealth
$wealth
$enemy_wealth
Truth table66%2/3
A and B
A= $wealthB= $enemy_wealth
| |||||||||||||||||||||||||||||||||||||||||||
| 173 | { | ||||||||||||||||||||||||||||||||||||||||||
| 174 | 1 | ▶ | if($enemy_wealth > $wealth) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 175 | { | ||||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | $war_points += 1 | |||||||||||||||||||||||||||||||||||||||||
| 177 | } | ||||||||||||||||||||||||||||||||||||||||||
| 178 | else | ||||||||||||||||||||||||||||||||||||||||||
| 179 | { | ||||||||||||||||||||||||||||||||||||||||||
| 180 | 1 | ▶ | if($progress_delta > 0 && $progress_delta < MAX_AFFORDABLE_PROGRESS) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$progress_delta > 0 and $progress_delta < "0.8"
MC/DC0%0/2
$progress_delta > 0 and $progress_delta < "0.8"
$progress_delta > 0
$progress_delta < "0.8"
Truth table33%1/3
A and B
A= $progress_delta > 0B= $progress_delta < "0.8"
| |||||||||||||||||||||||||||||||||||||||||||
| 181 | { | ||||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | $war_points += 1 | |||||||||||||||||||||||||||||||||||||||||
| 183 | } | ||||||||||||||||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||||||||||||||||
| 185 | } | ||||||||||||||||||||||||||||||||||||||||||
| 186 | } | ||||||||||||||||||||||||||||||||||||||||||
| 187 | else | ||||||||||||||||||||||||||||||||||||||||||
| 188 | { | ||||||||||||||||||||||||||||||||||||||||||
| 189 | 2 | $war_points += 1; | |||||||||||||||||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | #COALITION EVALUATION | ||||||||||||||||||||||||||||||||||||||||||
| 194 | 3 | ▶ | if($world->empire($self->name) && $world->empire($enemy->name) && $world->empire($self->name) > $world->empire($enemy->name)) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
$world->empire($self->name) and $world->empire($enemy->name) and $world->empire($self->name) > $world->empire($enemy->name)
$world->empire($self->name) and $world->empire($enemy->name)
MC/DC0%0/3
$world->empire($self->name) and $world->empire($enemy->name) and $world->empire($self->name) > $world->empire($enemy->name)
$world->empire($self->name)
$world->empire($enemy->name)
$world->empire($self->name) > $world->empire($enemy->name)
Truth table25%1/4
A and B and C
A= $world->empire($self->name)B= $world->empire($enemy->name)C= $world->empire($self->name) > $world->empire($enemy->name)
| |||||||||||||||||||||||||||||||||||||||||||
| 195 | { | ||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | $war_points += 1; | |||||||||||||||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||||||||||||||||
| 198 | 3 | ▶ | if($war_points + $level >= 4) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 199 | { | ||||||||||||||||||||||||||||||||||||||||||
| 200 | 3 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||||||||||||||||
| 202 | else | ||||||||||||||||||||||||||||||||||||||||||
| 203 | { | ||||||||||||||||||||||||||||||||||||||||||
| 204 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 205 | } | ||||||||||||||||||||||||||||||||||||||||||
| 206 | } | ||||||||||||||||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||||||||||||||||
| 208 | 11 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||