Skip to content

Opponent Has Number Of Units

Rubens de Oliveira Moraes Filho edited this page Apr 29, 2021 · 3 revisions

This boolean is responsible by evaluate if the opponent has a specific number of units.

Stand-alone application

This method returns true if the opponent controls <quantity> or more units of type <type>; returns false otherwise. OpponentHasNumberOfUnits can be interpreted (composed) as:

OpponentHasNumberOfUnits(<type>,<quantity>)

Used in a Loop (For)

OpponentHasNumberOfUnits can appear inside of a loop/if structure, however, the boolean can't receive a unit as a parameter, which means that this boolean will be used always as the stand-alone way.


In code (how to creat one)

BooleanDSL bool_example = new BooleanDSL("OpponentHasNumberOfUnits(Heavy,1)");

By translate method

bool_example.translate() --> print in Java console--> OpponentHasNumberOfUnits(Heavy,1)

By friendly translate method

bool_example.friendly_translate() --> print in Java console--> OpponentHasNumberOfUnits(Heavy,1)

By formated Structured DSL Tree Pre-Order Print method

BuilderDSLTreeSingleton.formatedStructuredDSLTreePreOrderPrint((iNodeDSLTree) bool_example); --> print in Java console--> b->OpponentHasNumberOfUnits(Heavy,1)

Clone this wiki locally