engine/calculators/source/ForestCalculator.cpp
// Get the pct chance of a particular deciduous tree being a fruit tree
// in the given terrain type, returning 0 if the terrain type is not 
// present in the map.
Get the pct chance of a particular deciduous tree being a fruit tree
in the given terrain type, returning 0 if the terrain type is not
present in the map.
Get the pct chance of a particular deciduous tree being a fruit tree in the given terrain type returning 0 if the terrain type is not present in the map .
int ForestCalculator::calculate_pct_chance_fruit(const TileType terrain_type)
{
  int pct_chance = 0;
  map<TileType, int>::iterator f_it = fruit_probability_map.find(terrain_type);
  if (f_it != fruit_probability_map.end())
  {
    pct_chance = f_it->second;
  }
  return pct_chance;
}
int ForestCalculator :: calculate_pct_chance_fruit ( const TileType terrain_type ) { int pct_chance = 0 ; map < TileType , int > :: iterator f_it = fruit_probability_map . find ( terrain_type ) ; if ( f_it != fruit_probability_map . end ( ) ) { pct_chance = f_it -> second ; } return pct_chance ; }
Get the pct chance of a particular deciduous tree being a fruit tree
in the given terrain type, returning 0 if the terrain type is not
present in the map.
Get the pct chance of a particular deciduous tree being a fruit tree in the given terrain type returning 0 if the terrain type is not present in the map .