From 7be3205969384f8d59872974cfd9ea6d63283e04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Bergstr=C3=B6m?= <davbe125@student.liu.se>
Date: Thu, 28 Jun 2018 15:57:16 +0200
Subject: [PATCH] Change function names to snake case where possible

---
 python-api-src/library.cpp | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp
index 38e5b8e..5d7c749 100644
--- a/python-api-src/library.cpp
+++ b/python-api-src/library.cpp
@@ -15,10 +15,10 @@ PYBIND11_MODULE(library, m)
 
     py::class_<Coordinator>(m, "Coordinator")
         .def(py::init())
-        .def("SetParticipants", &sc2::Coordinator::SetParticipants)
-        .def("LaunchStarcraft", &sc2::Coordinator::LaunchStarcraft)
-        .def("StartGame", &sc2::Coordinator::StartGame)
-        .def("Update", &sc2::Coordinator::Update);
+        .def("set_participants", &sc2::Coordinator::SetParticipants)
+        .def("launch_starcraft", &sc2::Coordinator::LaunchStarcraft)
+        .def("start_game", &sc2::Coordinator::StartGame)
+        .def("update", &sc2::Coordinator::Update);
 
     py::enum_<sc2::Race>(m, "Race")
         .value("Terran", sc2::Race::Terran)
@@ -56,8 +56,8 @@ PYBIND11_MODULE(library, m)
         .def("OnGameStart", &IDABot::OnGameStart)
         .def("OnStep", &IDABot::OnStep)
         .def("OnStep_UpdateIDABot", &IDABot::OnStep_UpdateIDABot)
-        .def("GetAllUnits", &IDABot::GetAllUnits)
-        .def("GetMyUnits", &IDABot::GetMyUnits)
+        .def("get_all_units", &IDABot::GetAllUnits)
+        .def("get_my_units", &IDABot::GetMyUnits)
         .def_property_readonly("base_manager", &IDABot::Bases);
 
     py::class_<sc2::PlayerSetup>(m, "PlayerSetup");
@@ -74,7 +74,6 @@ PYBIND11_MODULE(library, m)
         .value("CheatMoney", sc2::Difficulty::CheatMoney)
         .value("CheatInsane", sc2::Difficulty::CheatInsane);
 
-    m.def("CreateParticipant", &sc2::CreateParticipant, "Create participant from agent");
-
-    m.def("CreateComputer", &sc2::CreateComputer, "Create participant from built-in Starcraft computer");
+    m.def("create_participants", &sc2::CreateParticipant, "Create participant from agent");
+    m.def("create_computer", &sc2::CreateComputer, "Create participant from built-in Starcraft computer");
 }
-- 
GitLab