|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dip.world.VictoryConditions
Establishes the conditions required to determine who wins a game, and contains methods to evaluate if these condtions are met during adjudication.
Field Summary | |
protected java.util.List |
evalResults
|
protected int |
initialYear
|
protected int |
maxGameTimeYears
|
protected int |
maxYearsNoSCChange
|
protected int |
numSCForVictory
|
Constructor Summary | |
VictoryConditions(int numSCForVictory,
int maxYearsNoSCChange,
int maxGameTimeYears,
Phase initialPhase)
VictoryConditions constructor |
Method Summary | |
boolean |
evaluate(Adjudicator adjudicator,
Adjustment.AdjustmentInfoMap adjMap)
Evaluates the victory conditions. |
boolean |
evaluate(TurnState turnState,
Adjustment.AdjustmentInfoMap adjMap)
Evaluates the victory conditions. |
java.util.List |
getEvaluationResults()
Returns the Result(s) of evaluate(). |
int |
getMaxGameDurationYears()
Returns number maximum game duration, in years. |
int |
getSCsRequiredForVictory()
Returns the number of Supply Centers required for victory. |
int |
getYearsWithoutSCChange()
Returns number of Years without any Supply Center being captured for the game to end. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final int numSCForVictory
protected final int maxYearsNoSCChange
protected final int maxGameTimeYears
protected final int initialYear
protected transient java.util.List evalResults
Constructor Detail |
public VictoryConditions(int numSCForVictory, int maxYearsNoSCChange, int maxGameTimeYears, Phase initialPhase)
Method Detail |
public int getSCsRequiredForVictory()
public int getYearsWithoutSCChange()
public int getMaxGameDurationYears()
public java.util.List getEvaluationResults()
public boolean evaluate(Adjudicator adjudicator, Adjustment.AdjustmentInfoMap adjMap)
true
if
victory has been achieved (via any condition).
This method defers to the
evaluate(TurnState, Adjustment.AdjustmentInfoMap)
method.
adjMap
- adjustment map (as returned by Adjustment.getAdjustmentInfo())adjudicator
- an Adjudicator objectpublic boolean evaluate(TurnState turnState, Adjustment.AdjustmentInfoMap adjMap)
true
if
victory has been achieved (via any condition).
adjMap
- adjustment map (as returned by Adjustment.getAdjustmentInfo())turnState
- the TurnState
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |