dip.process
Interface Adjudicator

All Known Implementing Classes:
StdAdjudicator

public interface Adjudicator

Adjudicator interface.


Method Summary
 void addBouncedResult(OrderState os, OrderState bouncer)
          Add a BouncedResult to the result list
 void addDislodgedResult(OrderState os)
          Add a DislodgedResult to the result list
 void addResult(OrderState os, OrderResult.ResultType type, java.lang.String message)
          Add a Result to the result list
 void addResult(OrderState os, java.lang.String message)
          Add a Result to the result list
 void addResult(Result result)
          Add a Result to the result list
 OrderState findOrderStateBySrc(Location location)
          Find the OrderState with the given source Province.
 OrderState findOrderStateBySrc(Province src)
          Find the OrderState with the given source Province.
 TurnState getNextTurnState()
          Returns the next TurnState, or null if an error occured or the game has been won.
 OrderState[] getOrderStates()
          Get all OrderStates
 java.util.List getSubstitutedOrderStates()
          Returns a list of substituted orders.
 TurnState getTurnState()
          Get the TurnState that is currently being adjudicated, and that will have its results and flags set appropriately when adjudication is complete.
 boolean isSelfSupportedMove(OrderState os)
          Returns 'true' if The Orderstate in question is a support order that is supporting a move against itself.
 boolean isUnresolvedParadox()
          Returns true if an unresolved paradox was detected.
 void process()
          Start adjudication.
 void setPowerOrderChecking(boolean value)
          If enabled, checks to make sure that each Power's list of orders only contains orders from that Power.
 void setStatReporting(boolean value)
          Enable or disable reporting of failure statistics.
 

Method Detail

getTurnState

public TurnState getTurnState()
Get the TurnState that is currently being adjudicated, and that will have its results and flags set appropriately when adjudication is complete.


process

public void process()
Start adjudication.


isUnresolvedParadox

public boolean isUnresolvedParadox()
Returns true if an unresolved paradox was detected.


getNextTurnState

public TurnState getNextTurnState()
Returns the next TurnState, or null if an error occured or the game has been won.


setStatReporting

public void setStatReporting(boolean value)
Enable or disable reporting of failure statistics.


setPowerOrderChecking

public void setPowerOrderChecking(boolean value)
If enabled, checks to make sure that each Power's list of orders only contains orders from that Power. This is important for networked games, to prevent illicit order injection.


findOrderStateBySrc

public OrderState findOrderStateBySrc(Location location)
Find the OrderState with the given source Province. Returns null if no corresponding order was found. Note: Coast is not relevent here; only the Province in the given Location is used.


findOrderStateBySrc

public OrderState findOrderStateBySrc(Province src)
Find the OrderState with the given source Province. Returns null if no corresponding order was found.


getOrderStates

public OrderState[] getOrderStates()
Get all OrderStates


isSelfSupportedMove

public boolean isSelfSupportedMove(OrderState os)
Returns 'true' if The Orderstate in question is a support order that is supporting a move against itself.
  1. Support order is supporting a Move
  2. unit in supportedDest must be present
  3. power of unit in supported dest == power of support order


getSubstitutedOrderStates

public java.util.List getSubstitutedOrderStates()
Returns a list of substituted orders. This is a list of OrderStates. Note that all OrderStates in this list will be marked "illegal". Also note that this will not contain 'null' substitutions (e.g., no order was specified, and a Hold order was automatically generated).


addResult

public void addResult(Result result)
Add a Result to the result list


addBouncedResult

public void addBouncedResult(OrderState os,
                             OrderState bouncer)
Add a BouncedResult to the result list


addDislodgedResult

public void addDislodgedResult(OrderState os)
Add a DislodgedResult to the result list


addResult

public void addResult(OrderState os,
                      java.lang.String message)
Add a Result to the result list


addResult

public void addResult(OrderState os,
                      OrderResult.ResultType type,
                      java.lang.String message)
Add a Result to the result list



Copyright 2002-2004 Zachary DelProposto / jDip Development Team. All Rights Reserved.