Branch Coverage

blib/lib/Games/Dukedom.pm
Criterion Covered Total %
branch 3 176 1.7


line true false branch
366 17 0 if defined $value
375 19 0 if defined $value
384 0 0 if $self->game_over
417 0 4 unless grep /^$next$/, @settable_steps
439 0 0 if $self->_land->price < 4
485 0 0 $self->grain / $self->population < 11 ? :
487 0 0 unless $self->input_is_value
497 0 0 if $food < 100 and $self->grain > $food
499 0 0 if ($food > $self->grain) { }
0 0 elsif ($food / $self->population < 11 and $food != $self->grain) { }
528 0 0 if ($x1 < 13)
536 0 0 if $x1 > 4
541 0 0 if ($self->_population->starvations < 0)
558 0 0 unless $self->input_is_value
562 0 0 unless my $buy = $self->input
565 0 0 if $buy * $land->price > $self->grain
584 0 0 if ($land->price - $land->sell_price > 3)
593 0 0 unless $self->input_is_value
597 0 0 unless my $sold = $self->input
605 0 0 if ($sold > $x1) { }
0 0 elsif (($$grain{'trades'} = $sold * $price) > 4000) { }
613 0 0 if $self->_msg
621 0 0 if ($sold <= $self->land_fertility->{$_}) { }
631 0 0 unless ($valid)
642 0 0 if $self->land < 10
645 0 0 if ($price < 4 and $sold)
652 0 0 if $msg
660 0 0 if $self->king_unrest > 0
662 0 0 if $self->king_unrest > -2
682 0 0 if (int($self->_randomize('merc_quality')) * $mercs + $self->population > 2399) { }
707 0 0 unless $self->king_unrest > 0
712 0 0 unless $self->input_is_yn
719 0 0 $ans =~ /^n/i ? :
731 0 0 $grain_plant > $self->land ? :
733 0 0 $pop_plant > $max_grain_plant ? :
739 0 0 unless $self->input_is_value
751 0 0 if ($plant > $self->land)
755 0 0 if ($plant > $pop_plant)
761 0 0 if (-$grain->seed > $self->grain)
765 0 0 if ($msg)
800 0 0 if ($plant <= $$quality{$qfactor}) { }
811 0 0 unless ($valid)
845 0 0 unless ($self->year % 7)
857 0 0 if ($self->_land->planted == 0) { }
867 0 0 unless ($x1 < 9)
881 0 0 if $self->population < 67 or $self->king_unrest == -1
886 0 0 if $x1 > $self->population / 30
894 0 0 unless $self->input_is_yn
898 0 0 if ($self->input =~ /^n/i) { }
914 0 0 if ($self->king_unrest == -1) { }
925 0 0 if $war->tension < 2
927 0 0 if ($self->king_unrest or $self->population <= 109 or 17 * ($self->land - 400) + $self->grain <= 10600) { }
942 0 0 if $war->tension > $war->risk
948 0 0 if $self->_msg
962 0 0 unless $self->input_is_yn
969 0 0 if (not $self->input =~ /^n/i) { }
970 0 0 if ($$war{'first_strike'} >= $resistance) { }
983 0 0 if ($war->first_strike < 1)
991 0 0 if $self->_msg
1000 0 0 if $possible > 75
1001 0 0 if $possible < 0
1004 0 0 unless $self->input_is_value
1013 0 0 if ($hired > 75)
1030 0 0 if (-$land->spoils > int 0.67 * $self->land)
1047 0 0 if (-$x3 <= $$fertility{$_}) { }
1057 0 0 if (-$x1 <= $$fertility{$_}) { }
1070 0 0 if ($land->spoils < 399) { }
1071 0 0 if ($war->desire >= 0) { }
1084 0 0 if ($x6 <= 9) { }
1098 0 0 if ($self->king_unrest <= 0)
1105 0 0 if $x6 > $self->population
1113 0 0 if ($x6 <= $self->grain) { }
1125 0 0 if -$population->looted > $self->population
1132 0 0 if $$self{'_msg'} = $msg
1144 0 0 if ($x1 <= 3)
1145 0 0 if ($x1 != 1) { }
0 0 elsif ($self->_black_D <= 0) { }
1164 0 0 $population->looted ? :
1184 0 0 if $x1 > 0
1191 0 0 if $self->king_unrest < 0
1193 0 0 $self->king_unrest >= 2 ? :
1196 0 0 if (-$x1 > $self->grain)
1233 0 0 if ($self->status eq -1) { }
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 $self->game_over