From 8b8f276e631c0f9791fce324787c082d65296d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edvin=20Bergstr=C3=B6m?= <edvbe696@student.liu.se> Date: Tue, 17 Aug 2021 11:07:05 +0000 Subject: [PATCH] Add functions needed to play on SC2 AI Arena --- README.md | 1 + python-api-src/library.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 9c93229..568d479 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ Studio. 3. Run `make` to build the project (use `make -j N` if you want to use N threads) + # How to use the library with PyCharm See [separate page](pycharm.md). diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp index c0687c8..cc8cd5d 100644 --- a/python-api-src/library.cpp +++ b/python-api-src/library.cpp @@ -26,7 +26,10 @@ PYBIND11_MODULE(library, m) .def("set_participants", &sc2::Coordinator::SetParticipants, "participants"_a) .def("launch_starcraft", &sc2::Coordinator::LaunchStarcraft) .def("start_game", &sc2::Coordinator::StartGame, "map_path"_a) + .def("connect", &sc2::Coordinator::Connect, "port"_a) .def("update", &sc2::Coordinator::Update) + .def("all_games_ended", &sc2::Coordinator::AllGamesEnded) + .def("join_game", &sc2::Coordinator::JoinGame) .def("set_real_time", &sc2::Coordinator::SetRealtime) .def("load_replay_list",&sc2::Coordinator::SetReplayPath, "replay_path"_a) .def("add_replay_observer",&sc2::Coordinator::AddReplayObserver, "replay_observer"_a) -- GitLab