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

Fix code style

parent d4ae9862
Branches
Tags
No related merge requests found
......@@ -28,7 +28,7 @@ void define_unit(py::module & m)
.def_property_readonly("is_blip", &Unit::isBlip)
.def_property_readonly("target", &Unit::getTarget)
.def_property_readonly("has_target", &Unit::hasTarget)
.def_property_readonly("max_hit_points", &Unit::getMaxHitPoints)
.def_property_readonly("max_hit_points", &Unit::getMaxHitPoints)
.def("stop", &Unit::stop)
.def("attack_unit", &Unit::attackUnit)
.def("attack_move", &Unit::attackMove)
......
......@@ -10,7 +10,7 @@ void define_unittype(py::module & m)
.def_property_readonly("unit_typeid", [](UnitType & unit_type) { return static_cast<sc2::UNIT_TYPEID>(unit_type.getAPIUnitType()); })
.def_property_readonly("name", &UnitType::getName)
.def_property_readonly("race", &UnitType::getRace)
.def_property_readonly("movement_speed", &UnitType::getMovementSpeed)
.def_property_readonly("movement_speed", &UnitType::getMovementSpeed)
.def_property_readonly("is_valid", &UnitType::isValid)
.def_property_readonly("is_building", &UnitType::isBuilding)
.def_property_readonly("is_combat_unit", &UnitType::isCombatUnit, "The unit is not any of the following: worker, supply provider, building, larva, egg")
......@@ -44,4 +44,4 @@ void define_unittype(py::module & m)
// Not implemented in CommandCenter
//.def("whatBuilds", &UnitType::whatBuilds);
}
\ No newline at end of file
}
......@@ -303,11 +303,11 @@ Unit Unit::getTarget() const
BOT_ASSERT(isValid(), "Unit is not valid");
BOT_ASSERT(hasTarget(), "Unit has no target");
//if unit has order, check tag of target of first order
// if unit has order, check tag of target of first order
if(getUnitPtr()->orders.size() > 0){
//t_id is set to the unit tag of the target
// t_id is set to the unit tag of the target
CCUnitID t_id = getUnitPtr()->orders[0].target_unit_tag;
//IDAbot finds the unit with this tag
// IDABot finds the unit with this tag
return m_bot->GetUnit(t_id);
}
......@@ -344,4 +344,4 @@ CCHealth Unit::getMaxHitPoints() const
{
BOT_ASSERT(isValid(), "Unit is not valid");
return m_unit->health_max;
}
\ No newline at end of file
}
......@@ -50,7 +50,7 @@ public:
bool isBlip() const;
bool hasTarget() const;
Unit getTarget() const;
CCHealth getMaxHitPoints() const;
CCHealth getMaxHitPoints() const;
void stop () const;
void attackUnit (const Unit & target) const;
......
......@@ -23,7 +23,7 @@ public:
std::string getName() const;
CCRace getRace() const;
int getMovementSpeed() const;
int getMovementSpeed() const;
bool isValid() const;
bool isBuilding() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment