engine/generators/fortresses/source/MotteBaileyCastleGeneratorStrategy.cpp
// Generate the moat around the castle structure, generated on the
// centre of the map.
Generate the moat around the castle structure, generated on the
centre of the map.
Generate the moat around the castle structure generated on the centre of the map .
void MotteBaileyCastleGeneratorStrategy::generate_moat(MapPtr castle_map, const int start_y, const int start_x, int end_y, int end_x)
{
  TileGenerator tg;
  Dimensions dim = castle_map->size();
  vector<Coordinate> coords = CoordUtils::get_perimeter_coordinates(make_pair(start_y, start_x), make_pair(end_y, end_x));
  for (const Coordinate& c : coords)
  {
    TilePtr river_tile = tg.generate(TileType::TILE_TYPE_RIVER);
    castle_map->insert(c.first, c.second, river_tile);
  }
}
void MotteBaileyCastleGeneratorStrategy :: generate_moat ( MapPtr castle_map , const int start_y , const int start_x , int end_y , int end_x ) { TileGenerator tg ; Dimensions dim = castle_map -> size ( ) ; vector < Coordinate > coords = CoordUtils :: get_perimeter_coordinates ( make_pair ( start_y , start_x ) , make_pair ( end_y , end_x ) ) ; for ( const Coordinate & c : coords ) { TilePtr river_tile = tg . generate ( TileType :: TILE_TYPE_RIVER ) ; castle_map -> insert ( c . first , c . second , river_tile ) ; } }
Generate the moat around the castle structure, generated on the
centre of the map.
Generate the moat around the castle structure generated on the centre of the map .