diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp index 88cbd87f7d271f90e7da1159471ac87d1e44a466..05cf271ccf1db3039d31d1bc0c1ccc74b22e6959 100644 --- a/python-api-src/library.cpp +++ b/python-api-src/library.cpp @@ -62,18 +62,18 @@ PYBIND11_MODULE(library, m) .def(py::init()) .def("on_game_start", &IDABot::OnGameStart) .def("on_step", &IDABot::OnStep) - .def("get_all_units", &IDABot::GetAllUnits) - .def("get_my_units", &IDABot::GetMyUnits) + .def("get_all_units", &IDABot::GetAllUnits, "Returns a list of all units") + .def("get_my_units", &IDABot::GetMyUnits, "Returns a list of all units beloning to the player") .def("get_player_race", &IDABot::GetPlayerRace) .def_property_readonly("base_location_manager", &IDABot::Bases) .def_property_readonly("tech_tree", &IDABot::GetTechTree) .def_property_readonly("map_tools", &IDABot::Map) .def_property_readonly("building_placer", &IDABot::GetBuildingPlacer) - .def_property_readonly("start_location", &IDABot::GetStartLocation) - .def_property_readonly("minerals", &IDABot::GetMinerals) - .def_property_readonly("current_supply", &IDABot::GetCurrentSupply) - .def_property_readonly("max_supply", &IDABot::GetMaxSupply) - .def_property_readonly("gas", &IDABot::GetGas); + .def_property_readonly("start_location", &IDABot::GetStartLocation, "CCPosition representing the start location") + .def_property_readonly("minerals", &IDABot::GetMinerals, "How much minerals we currently have") + .def_property_readonly("current_supply", &IDABot::GetCurrentSupply, "How much supply we are currently using") + .def_property_readonly("max_supply", &IDABot::GetMaxSupply, "How much supply we can currently use") + .def_property_readonly("gas", &IDABot::GetGas, "How much gas we currently have"); py::class_<sc2::PlayerSetup>(m, "PlayerSetup"); @@ -92,9 +92,9 @@ PYBIND11_MODULE(library, m) py::class_<sc2::Color> color(m, "Color"); color.def(py::init<>()); color.def(py::init<int, int, int>(), "r"_a, "g"_a, "b"_a); - color.def_readwrite("r", &sc2::Color::r); - color.def_readwrite("g", &sc2::Color::g); - color.def_readwrite("b", &sc2::Color::b); + color.def_readwrite("r", &sc2::Color::r, "Red"); + color.def_readwrite("g", &sc2::Color::g, "Green"); + color.def_readwrite("b", &sc2::Color::b, "Blue"); color.attr("WHITE") = sc2::Colors::White; color.attr("RED") = sc2::Colors::Red; color.attr("GREEN") = sc2::Colors::Green;