App-traveller

 view release on metacpan or  search on metacpan

lib/Traveller/System/Classic.pm  view on Meta::CPAN

  $tradecodes .= ' Ri' if $self->atmosphere =~ /^[68]$/
      and $self->population >= 6 and $self->population <= 8
      and $self->government >= 4 and $self->government <= 9;
  $tradecodes .= ' Po' if $self->atmosphere >= 2 and $self->atmosphere <= 5
      and $self->hydro <= 3;
  $tradecodes .= ' Ag' if $self->atmosphere >= 4 and $self->atmosphere <= 9
      and $self->hydro >= 4 and $self->hydro <= 8
      and $self->population >= 5 and $self->population <= 7;
  $tradecodes .= ' Na' if $self->atmosphere <= 3 and $self->hydro <= 3
      and $self->population >= 6;
  $tradecodes .= ' In' if $self->atmosphere =~ /^[012479]$/ and $self->population >= 9;
  $tradecodes .= ' Ni' if $self->population <= 6;
  $tradecodes .= ' Wa' if $self->hydro == 10;
  $tradecodes .= ' De' if $self->atmosphere >= 2 and $self->hydro == 0;
  $tradecodes .= ' Va' if $self->atmosphere == 0;
  $tradecodes .= ' As' if $self->size == 0;
  $tradecodes .= ' Ic' if $self->atmosphere <= 1 and $self->hydro >= 1;
  return $tradecodes;
}

sub code {

lib/Traveller/System/Classic/MPTS.pm  view on Meta::CPAN

      and $self->atmosphere == 0
      and $self->hydro == 0;
  $tradecodes .= ' Ba' if $self->population == 0
      and $self->government == 0
      and $self->law == 0;
  $tradecodes .= ' De' if $self->atmosphere >= 2 and $self->hydro == 0;
  $tradecodes .= ' Fl' if $self->atmosphere =~ /^[ABC]$/ # erratum
      and $self->hydro >= 1;
  $tradecodes .= ' Hi' if $self->population >= 9;
  $tradecodes .= ' Ic' if $self->atmosphere <= 1 and $self->hydro >= 1;
  $tradecodes .= ' In' if $self->atmosphere =~ /^[012479]$/ and $self->population >= 9;
  $tradecodes .= ' Lo' if $self->population <= 3;
  $tradecodes .= ' Na' if $self->atmosphere <= 3 and $self->hydro <= 3
      and $self->population >= 6;
  $tradecodes .= ' Ni' if $self->population <= 6;
  $tradecodes .= ' Po' if $self->atmosphere >= 2 and $self->atmosphere <= 5
      and $self->hydro <= 3;
  $tradecodes .= ' Ri' if $self->atmosphere =~ /^[68]$/
      and $self->population >= 6 and $self->population <= 8
      and $self->government >= 4 and $self->government <= 9;
  $tradecodes .= ' Va' if $self->atmosphere == 0;



( run in 2.048 seconds using v1.01-cache-2.11-cpan-7add2cbd662 )