diff --git a/python-api-src/lib_point.cpp b/python-api-src/lib_point.cpp index b6a99086eb06c45b1274e0cb054512aa61f7d85d..6e46840601cfaf0e8921c0d034384e23d45831ad 100644 --- a/python-api-src/lib_point.cpp +++ b/python-api-src/lib_point.cpp @@ -15,7 +15,7 @@ void define_point(py::module & m) .def(py::self -= py::self) .def(py::self *= float()) .def(py::self /= float()) - // TODO: These does not compile + // These does not compile, but it is not a good idea to compare floats with floats anyway //.def(py::self == py::self) //.def(py::self != py::self) .def(py::self + py::self) diff --git a/python-api-src/lib_unittype.cpp b/python-api-src/lib_unittype.cpp index 40e2b5abcae8f8538df55ec4e4eb1aa59052fe02..935b58c10987e186929d577122dd572791011f7d 100644 --- a/python-api-src/lib_unittype.cpp +++ b/python-api-src/lib_unittype.cpp @@ -6,8 +6,6 @@ void define_unittype(py::module & m) { py::class_<UnitType>(m, "UnitType") .def(py::init<const sc2::UnitTypeID &, IDABot &>()) - // TODO: Rename this to is_typeid - .def("is_type_id", &UnitType::is, "Check if UnitType is UnitTypeID") .def(py::self == py::self) .def_property_readonly("unit_typeid", [](UnitType & unit_type) { return static_cast<sc2::UNIT_TYPEID>(unit_type.getAPIUnitType()); }) .def_property_readonly("name", &UnitType::getName) diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp index 73222c24490e7e8707dfa118dc0be382c9c7d509..88cbd87f7d271f90e7da1159471ac87d1e44a466 100644 --- a/python-api-src/library.cpp +++ b/python-api-src/library.cpp @@ -35,9 +35,7 @@ PYBIND11_MODULE(library, m) m.attr("PLAYER_ALLY") = py::int_((int) Players::Ally); /* - TODO: These also needs to be defined - - typedef SC2Type<ABILITY_ID> AbilityID; + TODO: BuffID is not defined, defined as following by Blizzard: typedef SC2Type<BUFF_ID> BuffID; */ py::class_<sc2::UnitTypeID>(m, "UnitTypeID") @@ -62,8 +60,6 @@ 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("on_game_start", &IDABot::OnGameStart) .def("on_step", &IDABot::OnStep) .def("get_all_units", &IDABot::GetAllUnits) diff --git a/src/MapTools.cpp b/src/MapTools.cpp index e04049c965ca3ec680ebdcb6a0505a38019a96ae..9adad0de01b7c3736c7cbfdc5e1be8765dd7adb4 100644 --- a/src/MapTools.cpp +++ b/src/MapTools.cpp @@ -160,8 +160,6 @@ void MapTools::onFrame() } } } - - draw(); } void MapTools::computeConnectivity() @@ -606,50 +604,4 @@ float MapTools::terrainHeight(const CCPosition & point) const #else return 0; #endif -} - - -void MapTools::draw() const -{ -#ifdef SC2API - CCPosition camera = m_bot.Observation()->GetCameraPos(); - int sx = (int)(camera.x - 12.0f); - int sy = (int)(camera.y - 8); - int ex = sx + 24; - int ey = sy + 20; - -#else - BWAPI::TilePosition screen(BWAPI::Broodwar->getScreenPosition()); - int sx = screen.x; - int sy = screen.y; - int ex = sx + 20; - int ey = sy + 15; -#endif - - for (int x = sx; x < ex; ++x) - { - for (int y = sy; y < ey; y++) - { - if (!isValidTile((int)x, (int)y)) - { - continue; - } - - // TODO: This maybe should be restored somehow? (Check git blame) - if (false) - { - std::stringstream ss; - ss << getSectorNumber(x, y); - drawText(CCPosition(Util::TileToPosition(x + 0.5f), Util::TileToPosition(y + 0.5f)), ss.str()); - } - - if (false) - { - CCColor color = isWalkable(x, y) ? CCColor(0, 255, 0) : CCColor(255, 0, 0); - if (isWalkable(x, y) && !isBuildable(x, y)) { color = CCColor(255, 255, 0); } - if (isBuildable(x, y) && !isDepotBuildableTile(x, y)) { color = CCColor(127, 255, 255); } - drawTile(x, y, color); - } - } - } -} +} \ No newline at end of file diff --git a/src/MapTools.h b/src/MapTools.h index b3c28b2e21a26c6bc33bc8fa2de0f43f08d691da..51f0533986cfb7a0c4b791d8c20178d346ab94c2 100644 --- a/src/MapTools.h +++ b/src/MapTools.h @@ -41,7 +41,6 @@ public: void onStart(); void onFrame(); - void draw() const; int width() const; int height() const;