Branch Coverage

blib/lib/Games/Dukedom.pm
Criterion Covered Total %
branch 3 178 1.6


line true false branch
393 17 0 if defined $value
402 19 0 if defined $value
441 0 4 unless $self->can($next)
466 0 0 if $self->_land->price < 4
510 0 0 $self->grain / $self->population < 11 ? :
512 0 0 unless $self->input_is_value
522 0 0 if $food < 100 and $self->grain > $food
524 0 0 if ($food > $self->grain) { }
0 0 elsif ($food / $self->population < 11 and $food != $self->grain) { }
553 0 0 if ($x1 < 13)
561 0 0 if $x1 > 4
566 0 0 if ($self->_population->starvations < 0)
581 0 0 unless $self->input_is_value
585 0 0 unless my $buy = $self->input
588 0 0 if $buy * $land->price > $self->grain
607 0 0 if ($land->price - $land->sell_price > 3)
621 0 0 unless $self->input_is_value
625 0 0 unless my $sold = $self->input
628 0 0 if ($sold > $x1) { }
0 0 elsif (($$grain{'trades'} = $sold * $price) > 4000) { }
636 0 0 if $self->_msg
644 0 0 if ($sold <= $self->land_fertility->{$_}) { }
654 0 0 unless ($valid)
665 0 0 if $self->land < 10
668 0 0 if ($price < 4 and $sold)
675 0 0 if $msg
683 0 0 if $self->king_unrest > 0
685 0 0 if $self->king_unrest > -2
705 0 0 if (int($self->_randomize('merc_quality')) * $mercs + $self->population > 2399) { }
730 0 0 unless $self->king_unrest > 0
735 0 0 unless $self->input_is_yn
742 0 0 $ans =~ /^n/i ? :
754 0 0 $grain_plant > $self->land ? :
756 0 0 $pop_plant > $max_grain_plant ? :
760 0 0 unless $self->input_is_value
772 0 0 if ($plant > $self->land)
776 0 0 if ($plant > 4 * $self->population)
782 0 0 if (-$grain->seed > $self->grain)
786 0 0 if ($msg)
821 0 0 if ($plant <= $$quality{$qfactor}) { }
832 0 0 unless ($valid)
866 0 0 unless ($self->year % 7)
878 0 0 if ($grain->yield == 0) { }
888 0 0 unless ($x1 < 9)
902 0 0 if $self->population < 67 or $self->king_unrest == -1
907 0 0 if $x1 > $self->population / 30
915 0 0 unless $self->input_is_yn
919 0 0 if ($self->input =~ /^n/i) { }
935 0 0 if ($self->king_unrest == -1) { }
944 0 0 if $war->potential < 2
945 0 0 if ($self->king_unrest or $self->population <= 109 or 17 * ($self->land - 400) + $self->grain <= 10600) { }
959 0 0 unless $self->war > $war->potential
965 0 0 if $self->_msg
978 0 0 unless $self->input_is_yn
985 0 0 if (not $self->input =~ /^n/i) { }
986 0 0 if ($self->_war->{'first_strike'} >= $x5) { }
1000 0 0 if ($self->_war->first_strike < 1)
1008 0 0 if $self->_msg
1017 0 0 if $possible > 75
1018 0 0 if $possible < 0
1021 0 0 unless $self->input_is_value
1030 0 0 if ($hired > 75)
1047 0 0 if $DEBUG
1053 0 0 if (-$land->spoils > int 0.67 * $self->land)
1070 0 0 if (-$x3 <= $$fertility{$_}) { }
1080 0 0 if (-$x1 <= $$fertility{$_}) { }
1093 0 0 if ($land->spoils < 399) { }
1094 0 0 if ($war->desire >= 0) { }
1105 0 0 if ($x6 <= 9) { }
1119 0 0 if ($self->king_unrest <= 0)
1126 0 0 if $x6 > $self->population
1134 0 0 if ($x6 <= $self->grain) { }
1146 0 0 if -$population->looted > $self->population
1153 0 0 if $$self{'_msg'} = $msg
1165 0 0 if ($x1 <= 3)
1166 0 0 if ($x1 != 1) { }
0 0 elsif ($self->black_D <= 0) { }
1185 0 0 $population->looted ? :
1205 0 0 if $x1 > 0
1212 0 0 if $self->king_unrest < 0
1214 0 0 $self->king_unrest >= 2 ? :
1217 0 0 if (-$x1 > $self->grain)
1253 0 0 if ($self->status eq -3) { }
0 0 elsif ($self->grain < 429 or $self->_unrest > 88 or $self->unrest > 99) { }
0 0 elsif ($self->population < 33) { }
0 0 elsif ($self->land < 45) { }
0 0 elsif ($self->year >= 45 and not $self->king_unrest) { }
1263 0 0 if $DEBUG
1286 0 0 if $self->game_over