diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp index bed54094d875c4c8558579c321c1b9d8359c977e..8f3bfceebb32cdc90604d7a37d8eee5ed08f3e86 100644 --- a/python-api-src/library.cpp +++ b/python-api-src/library.cpp @@ -54,13 +54,21 @@ PYBIND11_MODULE(library, m) // IDABot is a specialization of Agent py::class_<IDABot, PyIDABot, sc2::Agent>(m, "IDABot") .def(py::init()) + // TODO: The following 3 are CamelCased, but if the name is changed + // the name used for inheritance in Pyhon stays the same. Weird. .def("OnGameStart", &IDABot::OnGameStart) .def("OnStep", &IDABot::OnStep) .def("OnStep_UpdateIDABot", &IDABot::OnStep_UpdateIDABot) .def("get_all_units", &IDABot::GetAllUnits) .def("get_my_units", &IDABot::GetMyUnits) + .def("get_player_race", &IDABot::GetPlayerRace) + .def_property_readonly("base_location_manager", &IDABot::Bases) .def_property_readonly("tech_tree", &IDABot::TechTree) - .def_property_readonly("base_manager", &IDABot::Bases); + .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); py::class_<sc2::PlayerSetup>(m, "PlayerSetup");