public final class Region extends Object implements Comparable<Region>
Most parameters that are available are explicitly assigned by Broodwar itself.
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Region other) |
boolean |
equals(Object o) |
int |
getBoundsBottom()
Retrieves the approximate bottom boundary of the region.
|
int |
getBoundsLeft()
Retrieves the approximate left boundary of the region.
|
int |
getBoundsRight()
Retrieves the approximate right boundary of the region.
|
int |
getBoundsTop()
Retrieves the approximate top boundary of the region.
|
Position |
getCenter()
Retrieves the center of the region.
|
Region |
getClosestAccessibleRegion()
Retrieves the closest accessible neighbor region.
|
Region |
getClosestInaccessibleRegion()
Retrieves the closest inaccessible neighbor region.
|
int |
getDefensePriority()
Retrieves a value that represents the strategic advantage of this region relative
to other regions.
|
int |
getDistance(Region other)
Retrieves the center-to-center distance between two regions.
|
int |
getID()
Retrieves a unique identifier for this region.
|
List<Region> |
getNeighbors()
Retrieves the set of neighbor Regions that this one is connected to.
|
int |
getRegionGroupID()
Retrieves a unique identifier for a group of regions that are all connected and
accessible by each other.
|
List<Unit> |
getUnits() |
List<Unit> |
getUnits(UnitFilter pred)
Retrieves a List
|
int |
hashCode() |
boolean |
isAccessible()
Retrieves the state of accessibility of the region.
|
boolean |
isHigherGround()
Checks if this region is part of higher ground.
|
public int getID()
This identifier is explicitly assigned by Broodwar.
Game.getRegion(int)
public int getRegionGroupID()
This identifier is explicitly assigned by Broodwar.
public Position getCenter()
Position
indicating the center location of the Region, in pixels.public boolean isHigherGround()
public int getDefensePriority()
This value is explicitly assigned by Broodwar.
public boolean isAccessible()
public List<Region> getNeighbors()
public int getBoundsLeft()
public int getBoundsTop()
public int getBoundsRight()
public int getBoundsBottom()
public Region getClosestAccessibleRegion()
Region
that is accessible.public Region getClosestInaccessibleRegion()
Region
that is inaccessible.public int getDistance(Region other)
Ignores all collisions.
other
- The target Region
to calculate distance to.public List<Unit> getUnits(UnitFilter pred)
pred
- If this parameter is used, it is a UnitFilter or function predicate that will retrieve only the units whose attributes match the given criteria. If omitted, then a default value of null is used, in which case there is no filter.UnitFilter
public int compareTo(Region other)
compareTo
in interface Comparable<Region>
Copyright © 2022. All rights reserved.