|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdip.order.Order
dip.order.DefineState
Implementation of the Setup (DefineState) order.
This order is used to 'build' units, but typically cannot be issued.
Field Summary |
Fields inherited from class dip.order.Order |
ORD_VAL_BORDER, power, src, srcUnitType |
Constructor Summary | |
protected |
DefineState()
|
protected |
DefineState(Power power,
Location src,
Unit.Type srcUnit)
|
Method Summary | |
void |
determineDependencies(Adjudicator adjudicator)
Empty method: DefineState orders do not require dependency determination. |
boolean |
equals(java.lang.Object obj)
Determines if the orders are equal. |
void |
evaluate(Adjudicator adjudicator)
Empty method: DefineState orders do not require evaluation logic. |
java.lang.String |
getBriefName()
Returns the Brief name of the Order (e.g., "H" for a Hold order) |
java.lang.String |
getDefaultFormat()
Get the default OrderFormat String used to custom-format orders. |
java.lang.String |
getFullName()
Returns the Full name of the Order (e.g., "Hold" for a Hold order) |
java.lang.String |
toBriefString()
Prints the entire order, in a brief syntax |
java.lang.String |
toFullString()
Prints the entire order, in a verbose syntax |
void |
validate(TurnState state,
ValidationOptions valOpts,
RuleOptions ruleOpts)
DefineState orders will always fail validation. |
void |
verify(Adjudicator adjudicator)
DefineState orders do not require verification. |
Methods inherited from class dip.order.Order |
addSupportsOfAndMovesToSource, appendBrief, appendFull, checkPower, checkSeasonAdjustment, checkSeasonMovement, checkSeasonRetreat, getPower, getSource, getSourceUnitType, getValidatedUnitType, toFormattedString, toString, validate |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected DefineState(Power power, Location src, Unit.Type srcUnit) throws OrderException
protected DefineState()
Method Detail |
public java.lang.String getFullName()
Orderable
public java.lang.String getBriefName()
Orderable
public java.lang.String getDefaultFormat()
Orderable
public java.lang.String toBriefString()
Orderable
public java.lang.String toFullString()
Orderable
public boolean equals(java.lang.Object obj)
Order
Note that full equality MUST be implemented for each subclassed Order object! Subclasses are advised to call the super method for assistance.
equals
in class Order
public void validate(TurnState state, ValidationOptions valOpts, RuleOptions ruleOpts) throws OrderException
Their use is mainly for certain types of order parsing (like setting up a game state). For example, dip.misc.TestSuite uses DefineState orders to define the units and their positions for a test scenario.
validate
in interface Orderable
validate
in class Order
state
- Current turn statevalOpts
- Current validation options
OrderException
public void verify(Adjudicator adjudicator)
public void determineDependencies(Adjudicator adjudicator)
public void evaluate(Adjudicator adjudicator)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |