Branch Coverage

blib/lib/Game/TextMapper/Traveller.pm
Criterion Covered Total %
branch 128 144 88.8


line true false branch
63 36 44 unless $systems{$_}
72 1 43 if $size == 0
74 8 36 if $atmosphere < 2 or $atmosphere >= 10
75 8 36 if $hydro < 0 or $size < 2
76 0 44 if $hydro > 10
86 9 35 if ($starport <= 4) { }
14 21 elsif ($starport <= 6) { }
10 11 elsif ($starport <= 8) { }
4 7 elsif ($starport <= 9) { }
5 2 elsif ($starport <= 11) { }
89 1 8 if roll2d6() >= 10
90 3 6 if roll2d6() >= 8
91 2 7 if roll2d6() >= 8
95 7 7 if roll2d6() >= 9
96 5 9 if roll2d6() >= 8
97 3 11 if roll2d6() >= 10
101 7 3 if roll2d6() >= 8
102 2 8 if roll2d6() >= 10
103 0 10 if roll2d6() >= 12
106 3 1 if roll2d6() >= 7
107 0 4 if roll2d6() >= 10
110 0 5 if roll2d6() >= 10
115 16 28 if $size <= 4
116 2 42 if $size <= 1
117 16 28 if $atmosphere <= 3 or $atmosphere >= 10
118 5 39 if $hydro >= 9
119 2 42 if $hydro >= 10
120 27 17 if $population >= 1 and $population <= 5
121 2 42 if $population >= 9
122 0 44 if $population >= 10
123 12 32 if $government == 0 or $government == 5
124 0 44 if $government == 13
125 0 44 if $tech < 0
128 2 42 if $population >= 9
132 38 6 if $gas_giant
134 1 43 if $size == 0
137 2 42 if $atmosphere == 0
140 0 44 if $hydro eq "A"
142 3 41 if $atmosphere >= 2 and $hydro == 0
145 1 43 if $hydro >= 1 and $atmosphere <= 1
148 1 43 if $hydro >= 1 and $atmosphere >= 10
152 1 2 if $population eq 0 and $law eq 0 and $government eq 0
156 14 30 if $population >= 1 and $population <= 3
158 2 42 if $population >= 9
160 6 11 if $atmosphere >= 4 and $atmosphere <= 9 and $hydro >= 4 and $hydro <= 8 and $population >= 5 and $population <= 7
164 6 9 if $atmosphere <= 3 and $hydro <= 3 and $population >= 6
169 1 43 if &any(sub { $atmosphere == $_; } , 0, 1, 2, 4, 7, 9) and $population >= 9
171 36 8 if $population <= 6
173 0 4 if $government >= 4 and $government <= 9 and $atmosphere == 6 || $atmosphere == 8 and $population >= 6 and $population <= 8
177 10 27 if $atmosphere >= 2 and $atmosphere <= 5 and $hydro <= 3
184 8 36 if $naval_base
185 18 26 if $scout_base
186 7 37 if $research_base
187 0 44 if $pirate_base
188 7 25 if not $pirate_base and $atmosphere >= 10 || $population && $government == 0 || $population && $law == 0 || $government == 7 || $government == 10 || $law >= 9
203 564 52 if $code <= 9
274 2 42 if &any(sub { /^starport-X$/u; } , @$system1)
277 80 861 if &any(sub { /^starport-X$/u; } , @$system2)
279 41 820 if ($d <= 2 and match(qr/^(starport-[AB]|naval)$/u, qr/^(starport-[AB]|naval)$/u, $system1, $system2))
282 0 110 if ($d <= 2 and match(qr/^agriculture$/u, qr/^(agriculture|astroid|desert|high|industrial|low|non-agriculture|rich)$/u, $system1, $system2) || match(qr/^asteroid$/u, qr/^(asteroid|industrial|non-agriculture|rich|vacuum)$/u, $system1, $system2) || match(qr/^desert$/u, qr/^(desert|non-agriculture)$/u, $system1, $system2) || match(qr/^fluid$/u, qr/^(fluid|industrial)$/u, $system1, $system2) || match(qr/^high$/u, qr/^(high|low|rich)$/u, $system1, $system2) || match(qr/^ice$/u, qr/^industrial$/u, $system1, $system2) || match(qr/^industrial$/u, qr/^(agriculture|astroid|desert|fluid|high|industrial|non-industrial|poor|rich|vacuum|water)$/u, $system1, $system2) || match(qr/^low$/u, qr/^(industrial|rich)$/u, $system1, $system2) || match(qr/^non-agriculture$/u, qr/^(asteroid|desert|vacuum)$/u, $system1, $system2) || match(qr/^non-industrial$/u, qr/^industrial$/u, $system1, $system2) || match(qr/^rich$/u, qr/^(agriculture|desert|high|industrial|non-agriculture|rich)$/u, $system1, $system2) || match(qr/^vacuum$/u, qr/^(asteroid|industrial|vacuum)$/u, $system1, $system2) || match(qr/^water$/u, qr/^(industrial|rich|water)$/u, $system1, $system2))
326 0 861 if ($d <= 3 and match(qr/^rich$/u, qr/^(asteroid|agriculture|desert|high|industrial|non-agriculture|water|rich|low)$/u, $system1, $system2))
343 68 1895 if &any(sub { /$re1/u; } , @$sys1) and &any(sub { /$re2/u; } , @$sys2)
344 15 1880 if &any(sub { /$re2/u; } , @$sys1) and &any(sub { /$re1/u; } , @$sys2)
364 51 32 if (not $C{$u} && $C{$v} or $C{$u} != $C{$v})
368 9 42 if ($C{$u} and $C{$v}) { }
7 35 elsif ($C{$v} and not $C{$u}) { }
22 13 elsif ($C{$u} and not $C{$v}) { }
13 0 elsif (not $C{$u} || $C{$v}) { }
371 46 170 if $C{$_} == $C{$v}
394 80 0 if ($tile)
425 1 0 if $self->rows > 8
428 1 0 if $self->rows > 8