engine/generators/settlements/sector/source/ShadeGardenGenerator.cpp
// Generate the trees surrounding the garden
Generate the trees surrounding the garden
Generate the trees surrounding the garden
void ShadeGardenGenerator::generate_tree_cover(MapPtr map, const Coordinate& start_coord, const Coordinate& end_coord)
{
  TileGenerator tg;
  TilePtr tree_tile;
  for (int row = start_coord.first; row <= end_coord.first; row++)
  {
    tree_tile = tg.generate(TileType::TILE_TYPE_TREE);
    map->insert(row, start_coord.second, tree_tile); 
    tree_tile = tg.generate(TileType::TILE_TYPE_TREE);
    map->insert(row, end_coord.second, tree_tile);
  }
  for (int col = start_coord.second; col <= end_coord.second; col++)
  {
    tree_tile = tg.generate(TileType::TILE_TYPE_TREE);
    map->insert(start_coord.first, col, tree_tile);
    tree_tile = tg.generate(TileType::TILE_TYPE_TREE);
    map->insert(end_coord.first, col, tree_tile);
  }
}
void ShadeGardenGenerator :: generate_tree_cover ( MapPtr map , const Coordinate & start_coord , const Coordinate & end_coord ) { TileGenerator tg ; TilePtr tree_tile ; for ( int row = start_coord . first ; row <= end_coord . first ; row ++ ) { tree_tile = tg . generate ( TileType :: TILE_TYPE_TREE ) ; map -> insert ( row , start_coord . second , tree_tile ) ; tree_tile = tg . generate ( TileType :: TILE_TYPE_TREE ) ; map -> insert ( row , end_coord . second , tree_tile ) ; } for ( int col = start_coord . second ; col <= end_coord . second ; col ++ ) { tree_tile = tg . generate ( TileType :: TILE_TYPE_TREE ) ; map -> insert ( start_coord . first , col , tree_tile ) ; tree_tile = tg . generate ( TileType :: TILE_TYPE_TREE ) ; map -> insert ( end_coord . first , col , tree_tile ) ; } }
Generate the trees surrounding the garden
Generate the trees surrounding the garden