|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoc.robot.SOCPossiblePiece
soc.robot.SOCPossibleRoad
public class SOCPossibleRoad
This is a possible road that we can build.
Note that SOCPossibleShip
is a subclass.
Field Summary | |
---|---|
protected int |
longestRoadPotential
|
protected int |
longestRoadValue
|
protected java.util.Vector<SOCPossibleRoad> |
necessaryRoads
|
protected java.util.Vector<SOCPossiblePiece> |
newPossibilities
|
protected int |
numberOfNecessaryRoads
|
Fields inherited from class soc.robot.SOCPossiblePiece |
---|
biggestThreats, CARD, CITY, coord, eta, hasBeenExpanded, MAXPLUSONE, MIN, PICK_SPECIAL, pieceType, player, ROAD, score, SETTLEMENT, SHIP, threats, threatUpdatedFlag, updated |
Constructor Summary | |
---|---|
SOCPossibleRoad(SOCPlayer pl,
int co,
java.util.Vector<SOCPossibleRoad> nr)
constructor |
|
SOCPossibleRoad(SOCPossibleRoad pr)
copy constructor Note: This will not copy the vectors, just make empty ones |
Method Summary | |
---|---|
void |
addNecessaryRoad(SOCPossibleRoad rd)
add a possible road to the list of necessary roads |
void |
addNewPossibility(SOCPossiblePiece piece)
add a new possibility to the list |
int |
getLRPotential()
|
int |
getLRValue()
|
java.util.Vector<SOCPossibleRoad> |
getNecessaryRoads()
Get this possible road/ship's list of necessary roads, from constructor and/or addNecessaryRoad(SOCPossibleRoad) . |
java.util.Vector<SOCPossiblePiece> |
getNewPossibilities()
Get the list of any possibilities added by addNewPossibility(SOCPossiblePiece) . |
int |
getNumberOfNecessaryRoads()
Get the minimum number of necessary roads and/or ships. |
boolean |
isRoadNotShip()
Is this piece really a road on land, and not a ship on water (our subclass)? |
void |
setLRPotential(int value)
set the longest road potential |
void |
setLRValue(int value)
set the longest road value |
void |
setNumberOfNecessaryRoads(int num)
Set the minimum number of necessary roads and/or ships. |
Methods inherited from class soc.robot.SOCPossiblePiece |
---|
addBiggestThreat, addThreat, addToScore, clearBiggestThreats, clearThreats, clearUpdateFlag, getBiggestThreats, getCoordinates, getETA, getPlayer, getResourcesToBuild, getScore, getThreats, getType, hasBeenExpanded, isETAUpdated, isThreatUpdated, resetExpandedFlag, resetScore, setETA, setExpandedFlag, subtractFromScore, threatUpdated, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector<SOCPossibleRoad> necessaryRoads
protected java.util.Vector<SOCPossiblePiece> newPossibilities
protected int longestRoadValue
protected int longestRoadPotential
protected int numberOfNecessaryRoads
Constructor Detail |
---|
public SOCPossibleRoad(SOCPlayer pl, int co, java.util.Vector<SOCPossibleRoad> nr)
pl
- the ownerco
- coordinatesnr
- necessaryRoads, or null
to create a new empty Vector herepublic SOCPossibleRoad(SOCPossibleRoad pr)
pr
- the possible road to copyMethod Detail |
---|
public java.util.Vector<SOCPossibleRoad> getNecessaryRoads()
addNecessaryRoad(SOCPossibleRoad)
.
public int getNumberOfNecessaryRoads()
public void setNumberOfNecessaryRoads(int num)
num
- the minimum number of necessary roadspublic java.util.Vector<SOCPossiblePiece> getNewPossibilities()
addNewPossibility(SOCPossiblePiece)
.
public int getLRValue()
public int getLRPotential()
public void addNecessaryRoad(SOCPossibleRoad rd)
rd
- the roadpublic void addNewPossibility(SOCPossiblePiece piece)
piece
- the new possible piecepublic void setLRValue(int value)
value
- public void setLRPotential(int value)
value
- public final boolean isRoadNotShip()
SOCPlayingPiece.ROAD
), false otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |