|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.hagenah.diplomacy.game.DecisionAdjudicator
public class DecisionAdjudicator
This is an adjudicator (like the judges) for diplomacy. It supports especially
| Field Summary | |
|---|---|
static int |
OPTION_NMR_MASK
Mask for the OPTION_NMR_... options |
static int |
OPTION_NMR_NO
NMRs are not allowed. |
static int |
OPTION_NMR_YES
NMRs are allowed. |
static int |
OPTION_NOORDER_IGNORE
Orders with the RESULT_NOORDER flag are ignored |
static int |
OPTION_NOORDER_MASK
Mask for the OPTION_NOORDER_... options |
static int |
OPTION_NOORDER_NORMAL
Orders with the RESULT_NOORDER flag are processed like normal orders |
static int |
OPTION_PROXY_MASK
Mask for the OPTION_PROXY_... options |
static int |
OPTION_PROXY_NO
Proxy orders are not allowed. |
static int |
OPTION_PROXY_YES
Proxy orders are allowed. |
static int |
OPTION_RULE_IX7_MASK
Mask for the OPTION_RULE_IX7_... options |
static int |
OPTION_RULE_IX7_RELAXED
A dislodged unit, even with support, has no effect on the province that dislodged it if neither the dislodged nor the dislodging unit is convoyed. |
static int |
OPTION_RULE_XII3_ALL_SUCCESSFUL
A convoy is only successful if all possible convoy route are successful. |
static int |
OPTION_RULE_XII3_MASK
Mask for the OPTION_RULE_XII3_... options |
static int |
OPTION_RULE_XII3_ONE_SUCCESSFUL
A convoy is successful if atleast one convoy route is successful. |
static int |
OPTION_RULE_XII5_ARMYNOTCONVOYED
If there is a paradox it is resolved by not convoying all armies involved in the paradox (the RESULT_NOCONVOY result flag is set for these armies). |
static int |
OPTION_RULE_XII5_MASK
Mask for the OPTION_RULE_XII5_... options |
| Constructor Summary | |
|---|---|
DecisionAdjudicator(int options)
Creates an adjudicator for the specified options. |
|
| Method Summary | |
|---|---|
Phase |
adjudicate(Turn turn,
MapData map,
java.util.Map specialphasecenters,
java.util.Map units,
java.util.Map dislodgedunits,
java.util.Map centers,
java.util.Map builds,
java.util.Collection nmrorders,
java.util.SortedMap results,
java.util.List errors)
Adjudicates a turn. |
static boolean |
areOrdersIncomplete(Turn turn,
MapData map,
boolean noorderignore)
Are the orders of the turn incomplete (NMR orders necessary) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OPTION_RULE_XII5_ARMYNOTCONVOYED
public static final int OPTION_RULE_IX7_RELAXED
public static final int OPTION_RULE_XII3_ONE_SUCCESSFUL
public static final int OPTION_RULE_XII3_ALL_SUCCESSFUL
public static final int OPTION_NMR_NO
public static final int OPTION_NMR_YES
public static final int OPTION_PROXY_NO
public static final int OPTION_PROXY_YES
public static final int OPTION_NOORDER_NORMAL
public static final int OPTION_NOORDER_IGNORE
public static final int OPTION_RULE_XII5_MASK
public static final int OPTION_RULE_IX7_MASK
public static final int OPTION_RULE_XII3_MASK
public static final int OPTION_NMR_MASK
public static final int OPTION_PROXY_MASK
public static final int OPTION_NOORDER_MASK
| Constructor Detail |
|---|
public DecisionAdjudicator(int options)
options - The options for this adjudicator (OPTION_...)| Method Detail |
|---|
public Phase adjudicate(Turn turn,
MapData map,
java.util.Map specialphasecenters,
java.util.Map units,
java.util.Map dislodgedunits,
java.util.Map centers,
java.util.Map builds,
java.util.Collection nmrorders,
java.util.SortedMap results,
java.util.List errors)
turn - The turn to adjudicate.map - The map of the game.specialphasecenters - If the home centers type is HOME_CENTERS_PHASE and the special home
centers phase is before the phase of the turn the centers for the
special home centers phase, null otherwise.units - The units after the turn (Unit). The map must be empty and
the comparator must not be set.dislodgedunits - The dislodged units after the turn (Unit). The map must be empty and
the comparator must not be set.centers - The centers after the turn (Province → Country). The map must be
empty and the comparator must not be set.builds - The builds after the turn (Country → Integer). The map must be
empty and the comparator must not be set.nmrorders - The NMR orders created are added to this collection (Order), can be
null. If there already exists an order with a RESULT_NOORDER flag
it is checked that it's a NMR order but it is not added to this
collection.results - The result flags for the adjudication (Order → Integer). The
map must be empty and the comparator must be a UniqueOrderComparator.
If this parameter is null, the result flags are set with
Order.setResult().errors - The errors if the result is false. The list must be empty.
public static boolean areOrdersIncomplete(Turn turn,
MapData map,
boolean noorderignore)
turn - The turn to testmap - The map of the gamenoorderignore - true: orders with the RESULT_NOORDER flag are ignored,
false: orders with the RESULT_NOORDER flag are processed like normal orders
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||