|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoc.robot.SOCPossiblePiece
Pieces that a player might build
Field Summary | |
protected java.util.Vector |
biggestThreats
this is the piece that we need to beat to build this one |
static int |
CARD
|
static int |
CITY
|
protected int |
coord
Where this piece is on the board |
protected int |
eta
this is how soon we estimate we can build this piece measured in turns |
protected boolean |
hasBeenExpanded
this flag is used for expansion |
static int |
MAXPLUSONE
|
static int |
MIN
|
protected int |
pieceType
The type of this playing piece |
protected SOCPlayer |
player
The player who owns this piece |
static int |
ROAD
Types of playing pieces |
protected float |
score
this is a score used for deciding what to build next |
static int |
SETTLEMENT
|
protected java.util.Vector |
threats
pieces that threaten this piece |
protected boolean |
threatUpdatedFlag
this flag is used for threat updating |
protected boolean |
updated
this is a flag used for updating |
Constructor Summary | |
SOCPossiblePiece()
|
Method Summary | |
void |
addBiggestThreat(SOCPossiblePiece bt)
set the biggest threat |
void |
addThreat(SOCPossiblePiece piece)
add a threat to the list |
void |
addToScore(float amt)
add to score |
void |
clearBiggestThreats()
reset the biggest threat |
void |
clearThreats()
clear the list of threats |
void |
clearUpdateFlag()
clear the update flag |
java.util.Vector |
getBiggestThreats()
|
int |
getCoordinates()
|
int |
getETA()
|
SOCPlayer |
getPlayer()
|
float |
getScore()
|
java.util.Vector |
getThreats()
|
int |
getType()
|
boolean |
hasBeenExpanded()
|
boolean |
isETAUpdated()
|
boolean |
isThreatUpdated()
|
void |
resetExpandedFlag()
set hasBeenExpanded to false |
void |
resetScore()
reset the score |
void |
setETA(int e)
update the eta for this piece |
void |
setExpandedFlag()
set hasBeenExpanded to true |
void |
subtractFromScore(float amt)
subtract from score |
void |
threatUpdated()
mark this piece as having been threat updated |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ROAD
public static final int SETTLEMENT
public static final int CITY
public static final int CARD
public static final int MIN
public static final int MAXPLUSONE
protected int pieceType
protected SOCPlayer player
protected int coord
protected int eta
protected boolean updated
protected float score
protected java.util.Vector biggestThreats
protected java.util.Vector threats
protected boolean threatUpdatedFlag
protected boolean hasBeenExpanded
Constructor Detail |
public SOCPossiblePiece()
Method Detail |
public int getType()
public SOCPlayer getPlayer()
public int getCoordinates()
public int getETA()
public void setETA(int e)
e
- the new etapublic boolean isETAUpdated()
public void clearUpdateFlag()
public void resetScore()
public void addToScore(float amt)
amt
- the amount to addpublic void subtractFromScore(float amt)
amt
- the amount to subtractpublic float getScore()
public void clearBiggestThreats()
public void addBiggestThreat(SOCPossiblePiece bt)
bt
- the threatpublic java.util.Vector getBiggestThreats()
public java.util.Vector getThreats()
public void addThreat(SOCPossiblePiece piece)
piece
- public boolean isThreatUpdated()
public void clearThreats()
public void threatUpdated()
public boolean hasBeenExpanded()
public void resetExpandedFlag()
public void setExpandedFlag()
public java.lang.String toString()
|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |