-
Notifications
You must be signed in to change notification settings - Fork 104
Has Unit Within Distance From Opponent
This boolean is responsible by evaluate if a player unit is within a distance from an opponent unit.
This method returns true if any unit of type <type>
controlled by the player is within a distance of <distance>
from an opponent unit; returns false otherwise. The <distance>
is considered as the bound for a euclidian distance between the units. HasUnitWithinDistanceFromOpponent can be interpreted (composed) as:
Used in a Loop (For)
HasUnitWithinDistanceFromOpponent can appear inside of a loop/if structure. This method returns true if unit <unit> of type
controlled by the player is within a distance of
from an opponent unit; returns false otherwise. Note that the method also returns false if the type of the unit
provided as input isn't of type
. The parameter
` changes the command like the example below:
BooleanDSL bool_example = new BooleanDSL("HasUnitWithinDistanceFromOpponent(Light,3)");
bool_example.translate()
--> print in Java console--> HasUnitWithinDistanceFromOpponent(Light,3)
bool_example.friendly_translate()
--> print in Java console--> HasUnitWithinDistanceFromOpponent(Light,3)
BuilderDSLTreeSingleton.formatedStructuredDSLTreePreOrderPrint((iNodeDSLTree) bool_example);
--> print in Java console--> b->HasUnitWithinDistanceFromOpponent(Light,3)