engine/generators/source/SpiralDungeonGenerator.cpp
// Place the staircases at random on the generated map.
Place the staircases at random on the generated map.
Place the staircases at random on the generated map .
MapPtr SpiralDungeonGenerator::place_staircases(MapPtr map, const bool place_up_stairs, const bool place_down_stairs)
{
  TileGenerator tg;
  MapPtr result_map = map;
  if (place_up_stairs)
  {
    StaircaseTilePtr up_staircase = tg.generate_staircase(StaircaseType::STAIRCASE_UP);
    result_map = place_random_staircase(map, up_staircase);
  }
  if (place_down_stairs)
  {
    StaircaseTilePtr down_staircase = tg.generate_staircase(StaircaseType::STAIRCASE_DOWN);
    result_map = place_random_staircase(result_map, down_staircase);
  }
  return result_map;
}
MapPtr SpiralDungeonGenerator :: place_staircases ( MapPtr map , const bool place_up_stairs , const bool place_down_stairs ) { TileGenerator tg ; MapPtr result_map = map ; if ( place_up_stairs ) { StaircaseTilePtr up_staircase = tg . generate_staircase ( StaircaseType :: STAIRCASE_UP ) ; result_map = place_random_staircase ( map , up_staircase ) ; } if ( place_down_stairs ) { StaircaseTilePtr down_staircase = tg . generate_staircase ( StaircaseType :: STAIRCASE_DOWN ) ; result_map = place_random_staircase ( result_map , down_staircase ) ; } return result_map ; }
Place the staircases at random on the generated map.
Place the staircases at random on the generated map .