Branch Coverage

blib/lib/Game/TextMapper/Traveller.pm
Criterion Covered Total %
branch 134 144 93.0


line true false branch
63 79 81 unless $systems{$_}
72 3 78 if $size == 0
74 27 54 if $atmosphere < 2 or $atmosphere >= 10
75 21 60 if $hydro < 0 or $size < 2
76 3 78 if $hydro > 10
86 11 70 if ($starport <= 4) { }
26 44 elsif ($starport <= 6) { }
23 21 elsif ($starport <= 8) { }
9 12 elsif ($starport <= 9) { }
11 1 elsif ($starport <= 11) { }
89 0 11 if roll2d6() >= 10
90 4 7 if roll2d6() >= 8
91 3 8 if roll2d6() >= 8
95 10 16 if roll2d6() >= 9
96 12 14 if roll2d6() >= 8
97 6 20 if roll2d6() >= 10
101 9 14 if roll2d6() >= 8
102 4 19 if roll2d6() >= 10
103 1 22 if roll2d6() >= 12
106 5 4 if roll2d6() >= 7
107 4 5 if roll2d6() >= 10
110 1 10 if roll2d6() >= 10
115 38 43 if $size <= 4
116 7 74 if $size <= 1
117 39 42 if $atmosphere <= 3 or $atmosphere >= 10
118 11 70 if $hydro >= 9
119 5 76 if $hydro >= 10
120 48 33 if $population >= 1 and $population <= 5
121 4 77 if $population >= 9
122 1 80 if $population >= 10
123 15 66 if $government == 0 or $government == 5
124 0 81 if $government == 13
125 0 81 if $tech < 0
128 4 77 if $population >= 9
132 64 17 if $gas_giant
134 3 78 if $size == 0
137 8 73 if $atmosphere == 0
140 0 81 if $hydro eq "A"
142 3 78 if $atmosphere >= 2 and $hydro == 0
145 0 81 if $hydro >= 1 and $atmosphere <= 1
148 8 73 if $hydro >= 1 and $atmosphere >= 10
152 2 1 if $population eq 0 and $law eq 0 and $government eq 0
156 14 67 if $population >= 1 and $population <= 3
158 4 77 if $population >= 9
160 8 13 if $atmosphere >= 4 and $atmosphere <= 9 and $hydro >= 4 and $hydro <= 8 and $population >= 5 and $population <= 7
164 10 21 if $atmosphere <= 3 and $hydro <= 3 and $population >= 6
169 2 79 if &any(sub { $atmosphere == $_; } , 0, 1, 2, 4, 7, 9) and $population >= 9
171 63 18 if $population <= 6
173 3 7 if $government >= 4 and $government <= 9 and $atmosphere == 6 || $atmosphere == 8 and $population >= 6 and $population <= 8
177 15 47 if $atmosphere >= 2 and $atmosphere <= 5 and $hydro <= 3
184 16 65 if $naval_base
185 24 57 if $scout_base
186 13 68 if $research_base
187 6 75 if $pirate_base
188 12 39 if not $pirate_base and $atmosphere >= 10 || $population && $government == 0 || $population && $law == 0 || $government == 7 || $government == 10 || $law >= 9
203 1014 120 if $code <= 9
274 1 80 if &any(sub { /^starport-X$/u; } , @$system1)
277 12 1564 if &any(sub { /^starport-X$/u; } , @$system2)
279 58 1506 if ($d <= 2 and match(qr/^(starport-[AB]|naval)$/u, qr/^(starport-[AB]|naval)$/u, $system1, $system2))
282 0 231 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 18 1546 if ($d <= 3 and match(qr/^rich$/u, qr/^(asteroid|agriculture|desert|high|industrial|non-agriculture|water|rich|low)$/u, $system1, $system2))
343 103 3901 if &any(sub { /$re1/u; } , @$sys1) and &any(sub { /$re2/u; } , @$sys2)
344 29 3872 if &any(sub { /$re2/u; } , @$sys1) and &any(sub { /$re1/u; } , @$sys2)
364 93 39 if (not $C{$u} && $C{$v} or $C{$u} != $C{$v})
368 16 77 if ($C{$u} and $C{$v}) { }
18 59 elsif ($C{$v} and not $C{$u}) { }
31 28 elsif ($C{$u} and not $C{$v}) { }
28 0 elsif (not $C{$u} || $C{$v}) { }
371 68 240 if $C{$_} == $C{$v}
394 160 0 if ($tile)
425 2 0 if $self->rows > 8
428 2 0 if $self->rows > 8