Skip to content

Equivalent for BWAPI C++'s UnitFilter? #90

@adakitesystems

Description

@adakitesystems

Thanks to @SonkoMagnus for mentioning the lack of BWAPI C++'s UnitFilter equivalent in BWAPI4J. Example:

Unit supplyBuilder = 
  u->getClosestUnit(GetType == supplyProviderType.whatBuilds().first 
    && (IsIdle || IsGatheringMinerals) 
    && IsOwned);

where getClosestUnit is declared as:

Unit UnitInterface::getClosestUnit(const UnitFilter &pred, int radius) const

As per @SonkoMagnus's suggestion, we could use Predicate as the equivalent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionmissingA feature is absent from BWAPI4J but not the original C++ BWAPI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions