diff --git a/docs/coordinates.rst b/docs/coordinates.rst index a9ef7d42cdf78daa64484b05118761bfd4b2dfc2..9aca00ceb9dc90bd7707e249ba8af178677c80cd 100644 --- a/docs/coordinates.rst +++ b/docs/coordinates.rst @@ -3,9 +3,9 @@ Coordinates The library uses 2 types of coordinate classes. One for integers and one for floats, these are called :class:`library.Point2DI` and -:class:`library.Point2D`. Convertion between the two types is possible by +:class:`library.Point2D`. Conversion between the two types is possible by sending the other type as argument in the constructor. In the case of -Point2D to Point2DI the floating point values will just be casted into +Point2D to Point2DI the floating point values will just be cast into integer values. Both of the types are hashable so they can be used in sets and dictionaries. diff --git a/python-api-src/lib_unit.cpp b/python-api-src/lib_unit.cpp index 99a4f56d282b728c181c6e745efe814e28a50dd5..e6095a856012a59d6ee789aafd506af98c67e263 100644 --- a/python-api-src/lib_unit.cpp +++ b/python-api-src/lib_unit.cpp @@ -34,7 +34,7 @@ void define_unit(py::module & m) .def_property_readonly("progression_list", &Unit::getAllProgress, "Returns a list containing the progression on all the processes in order. Empty list if no process exists") .def_property_readonly("current_ability_id", &Unit::getCurrentAbilityID, "The AbilityID of currently used ability") .def_property_readonly("facing", &Unit::getFacing, "Direction the unit faces in radians (1 radian == 57.296 degrees)") - .def_property_readonly("radius", &Unit::getRadius, "Retruns the radius of the unit") + .def_property_readonly("radius", &Unit::getRadius, "Returns the radius of the unit") .def_property_readonly("is_carrying_minerals", &Unit::isCarryingMinerals, "Returns if this unit is currently holding minerals") .def_property_readonly("is_carrying_gas", &Unit::isCarryingGas, "Returns if this unit is currently holding gas") .def_property_readonly("gas_left_in_refinery", &Unit::gasLeftInGeyser, "Amount of vespene left in the the refinery.") @@ -55,7 +55,7 @@ void define_unit(py::module & m) .def("move", py::overload_cast<const CCPosition &>(&Unit::move, py::const_)) .def("move", py::overload_cast<const CCTilePosition &>(&Unit::move, py::const_)) .def("right_click", &Unit::rightClick, "Same as right-clicking in the game, for example making workers mine minerals") - .def("repair", &Unit::repair, "Rightclicks on the provided unit in order to repair it") + .def("repair", &Unit::repair, "Right-clicks on the provided unit in order to repair it") .def("build", &Unit::build, "Build unit of type building_type at given position", "building_type"_a, "position"_a) .def("build_target", &Unit::buildTarget, "Build building_type on top of target Unit, useful for building refineries", "building_type"_a, "target"_a) .def("train", &Unit::train, "Train unit of type", "unit_type"_a) diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp index fdfe49e5cc4da999bde93f95ec76eb0e1d38b193..c0687c85fa1413d8dce4ba7066e02c5233e8401d 100644 --- a/python-api-src/library.cpp +++ b/python-api-src/library.cpp @@ -102,8 +102,8 @@ PYBIND11_MODULE(library, m) .def("debug_set_energy", &IDABot::DebugSetEnergy, "Set the energy on a unit through debug mode") .def("debug_set_life", &IDABot::DebugSetLife, "Set the life on a unit through debug mode") .def("debug_set_shields", &IDABot::DebugSetShields, "Set the shields on a unit through debug mode") - .def("get_enemy_base_location", &IDABot::GetEnemyBaseLocations, "Return the CCpostion of the enemy base") - .def("move_camera", &IDABot::CameraMove, "Move the camera to the postion", "p"_a) + .def("get_enemy_base_location", &IDABot::GetEnemyBaseLocations, "Return the CCposition of the enemy base") + .def("move_camera", &IDABot::CameraMove, "Move the camera to the position", "p"_a) .def("has_creep", &IDABot::HasCreep, "Returns true if there is creep at position p", "p"_a) .def("ability_for_upgrade", &IDABot::abilityForUpgrade, "Ability that researches this upgrade", "upgrade"_a) .def("upgrade_mineral_cost", &IDABot::UpgradeMineralCost, "Mineral cost of researching the upgrade", "upgrade"_a)