diff --git a/docs/perception.rst b/docs/perception.rst index 9bbbe07a3f4c16bea53c39ab6bd0ab343e650fe7..98ed84f1b87ed14427cc14ac34188760a2a1a5d7 100644 --- a/docs/perception.rst +++ b/docs/perception.rst @@ -46,11 +46,11 @@ BaseLocation the BaseLocationManager to keep track of all base locations and related information. - .. attribute:: position + .. attribute:: library.BaseLocation.position The position of the center of the BaseLocation, defined as a :class:`library.Point2D`. - .. attribute:: depot_position + .. attribute:: library.BaseLocation.depot_position A suitable position for building a town hall (Command Center, Hatchery or Nexus), defined as a :class:`library.Point2DI`. @@ -131,3 +131,9 @@ BuildingPlacer .. autoclass:: library.BuildingPlacer :members: :undoc-members: + + This class is useful for placing all buildings, except refineries and town halls (Command Centers, Hacheries and Nexus). + + If you want to place a town hall, take a look at attribute `depot_location` of :class:`library.BaseLocation`. + + If you want to place a refinery, take a look at attribute `geysers` of :class:`library.BaseLocation` and the method build_target of :class:`library.Unit`. diff --git a/python-api-src/lib_building_placer.cpp b/python-api-src/lib_building_placer.cpp index 0102dd8a377d2acba376f722a9c873e535b58ad2..5de5428a248c8ec45ffee25636efef55dae36a13 100644 --- a/python-api-src/lib_building_placer.cpp +++ b/python-api-src/lib_building_placer.cpp @@ -10,6 +10,4 @@ void define_building_placer(py::module & m) .def("get_build_location_near", &BuildingPlacer::getBuildLocationNear, "point2di"_a, "unit_type"_a, "build_distance"_a) .def("reserve_tiles", &BuildingPlacer::reserveTiles, "x"_a, "y"_a, "width"_a, "height"_a) .def("free_tiles", &BuildingPlacer::freeTiles, "x"_a, "y"_a, "width"_a, "height"_a); - // TODO: Update this method to find refinery positions outside the first base - //.def("get_refinery_position", &BuildingPlacer::getRefineryPosition); } \ No newline at end of file