-
Notifications
You must be signed in to change notification settings - Fork 104
Has Unit In Opponent Range
This boolean is responsible by evaluate if there is a unit that has been attacked by an opponent unit.
This method returns true if any of the player's unit of <type>
is within attack range of an opponent unit; it returns false otherwise.
HasUnitInOpponentRange can be interpreted (composed) as:
Used in a Loop (For)
HasUnitInOpponentRange can appear inside of a loop/if structure. This method returns true if the player's unit <unit>
of type <type>
is within attack range of an opponent unit; it returns false otherwise. Note that the method also returns false if the type t given as input doesn't match the type of the unit <unit>
. The parameter <unit>
changes the command like the example below:
BooleanDSL bool_example = new BooleanDSL("HasUnitInOpponentRange(Light)");
bool_example.translate()
--> print in Java console--> HasUnitInOpponentRange(Light)
bool_example.friendly_translate()
--> print in Java console--> HasUnitInOpponentRange(Light)
BuilderDSLTreeSingleton.formatedStructuredDSLTreePreOrderPrint((iNodeDSLTree) bool_example);
--> print in Java console--> b->HasUnitInOpponentRange(Light)