|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soc.util.SOCRobotParameters
public class SOCRobotParameters
This is a class to store a list of robot parameters. I put it in soc.util because the SOCServer and the SOCDBHelper needed to use it, but I didn't think they should have to include the soc.robot package.
Field Summary | |
---|---|
protected float |
adversarialFactor
|
protected float |
devCardMultiplier
|
protected float |
etaBonusFactor
|
protected float |
leaderAdversarialFactor
|
protected int |
maxETA
|
protected int |
maxGameLength
|
protected int |
strategyType
|
protected float |
threatMultiplier
|
protected int |
tradeFlag
|
Constructor Summary | |
---|---|
SOCRobotParameters(int mgl,
int me,
float ebf,
float af,
float laf,
float dcm,
float tm,
int st,
int tf)
constructor |
|
SOCRobotParameters(SOCRobotParameters params)
copy constructor |
Method Summary | |
---|---|
SOCRobotParameters |
copyIfOptionChanged(java.util.Map<java.lang.String,SOCGameOption> gameOpts)
Examine game options, and if any would change the robot parameters, make a copy of these parameters with the changed options. |
float |
getAdversarialFactor()
|
float |
getDevCardMultiplier()
|
float |
getETABonusFactor()
|
float |
getLeaderAdversarialFactor()
|
int |
getMaxETA()
|
int |
getMaxGameLength()
|
int |
getStrategyType()
|
float |
getThreatMultiplier()
|
int |
getTradeFlag()
Does this robot make/accept trades with other players? |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int maxGameLength
protected int maxETA
protected float etaBonusFactor
protected float adversarialFactor
protected float leaderAdversarialFactor
protected float devCardMultiplier
protected float threatMultiplier
protected int strategyType
protected int tradeFlag
Constructor Detail |
---|
public SOCRobotParameters(int mgl, int me, float ebf, float af, float laf, float dcm, float tm, int st, int tf)
mgl
- the max game lengthme
- the max etaebf
- the eta bonus factoraf
- the adversarial factorlaf
- the leader adversarial factordcm
- the dev card multipliertm
- the threat multiplierst
- the strategy type: FAST_STRATEGY
or SMART_STRATEGY
tf
- the trade flag: Does this robot make/accept trades with players? (1 or 0)public SOCRobotParameters(SOCRobotParameters params)
params
- the robot parametersMethod Detail |
---|
public SOCRobotParameters copyIfOptionChanged(java.util.Map<java.lang.String,SOCGameOption> gameOpts)
getTradeFlag()
is 1, copy and set it to 0.
gameOpts
- The game's SOCGameOption
s, or null
public int getMaxGameLength()
public int getMaxETA()
public float getETABonusFactor()
public float getAdversarialFactor()
public float getLeaderAdversarialFactor()
public float getDevCardMultiplier()
public float getThreatMultiplier()
public int getStrategyType()
FAST_STRATEGY
or SOCRobotDM.SMART_STRATEGY
public int getTradeFlag()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |