Skip to content
Snippets Groups Projects
Commit 8b14642b authored by David Bergström's avatar David Bergström
Browse files

Add the last properties of IDABot to the Python-API

parent bde90cff
No related branches found
No related tags found
No related merge requests found
......@@ -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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment