engine/generators/worship_sites/source/CathedralGenerator.cpp
// Generate east-west pews, up to the midway point of the cathedral.
Generate east-west pews, up to the midway point of the cathedral.
Generate east - west pews up to the midway point of the cathedral .
void CathedralGenerator::generate_pews(MapPtr map, const int pew_end_row, const int pew_end_col)
{
  for (int pew_col = start_col + 4; pew_col < pew_end_col; pew_col++)
  {
    for (int pew_row = start_row+2; pew_row < pew_end_row; pew_row++)
    {
      if (pew_row == (start_row + (church_height / 2)) || pew_row == (start_row + (church_height / 2 - 1)))
      {
        continue;
      }
      else if (pew_col % 2 == 0)
      {
        FeaturePtr pew = FeatureGenerator::generate_pew(PewDirection::PEW_DIRECTION_EAST_WEST);
        TilePtr current_tile = map->at(pew_row, pew_col);
        current_tile->set_feature(pew);
      }
    }
  }
}
void CathedralGenerator :: generate_pews ( MapPtr map , const int pew_end_row , const int pew_end_col ) { for ( int pew_col = start_col + 4 ; pew_col < pew_end_col ; pew_col ++ ) { for ( int pew_row = start_row + 2 ; pew_row < pew_end_row ; pew_row ++ ) { if ( pew_row == ( start_row + ( church_height / 2 ) ) || pew_row == ( start_row + ( church_height / 2 - 1 ) ) ) { continue ; } else if ( pew_col % 2 == 0 ) { FeaturePtr pew = FeatureGenerator :: generate_pew ( PewDirection :: PEW_DIRECTION_EAST_WEST ) ; TilePtr current_tile = map -> at ( pew_row , pew_col ) ; current_tile -> set_feature ( pew ) ; } } } }
Generate east-west pews, up to the midway point of the cathedral.
Generate east - west pews up to the midway point of the cathedral .
// Space the pews nicely.