| 715 | return this->getUnitsInRectangle(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y, pred); |
| 716 | } |
| 717 | Unit Game::getClosestUnit(Position center, const UnitFilter &pred, int radius) const |
| 718 | { |
| 719 | return this->getClosestUnitInRectangle(center, |
| 720 | [&](Unit u){ return u->getDistance(center) <= radius && (!pred.isValid() || pred(u));}, |
| 721 | center.x - radius, |
| 722 | center.y - radius, |
| 723 | center.x + radius, |
| 724 | center.y + radius); |
| 725 | } |
| 726 | //------------------------------------------ REGIONS ----------------------------------------------- |
| 727 | BWAPI::Region Game::getRegionAt(BWAPI::Position position) const |
| 728 | { |
no test coverage detected