JSettlers v1.0.6 API
Built ${date}

soc.robot
Class SOCPossibleRoad

java.lang.Object
  extended bysoc.robot.SOCPossiblePiece
      extended bysoc.robot.SOCPossibleRoad

public class SOCPossibleRoad
extends SOCPossiblePiece

This is a possible road that we can build

Author:
Robert S Thomas

Field Summary
protected  int longestRoadPotential
           
protected  int longestRoadValue
           
protected  java.util.Vector necessaryRoads
           
protected  java.util.Vector newPossibilities
           
protected  int numberOfNecessaryRoads
           
 
Fields inherited from class soc.robot.SOCPossiblePiece
biggestThreats, CARD, CITY, coord, eta, hasBeenExpanded, MAXPLUSONE, MIN, pieceType, player, ROAD, score, SETTLEMENT, threats, threatUpdatedFlag, updated
 
Constructor Summary
SOCPossibleRoad(SOCPlayer pl, int co, java.util.Vector 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 getNecessaryRoads()
           
 java.util.Vector getNewPossibilities()
           
 int getNumberOfNecessaryRoads()
           
 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
 
Methods inherited from class soc.robot.SOCPossiblePiece
addBiggestThreat, addThreat, addToScore, clearBiggestThreats, clearThreats, clearUpdateFlag, getBiggestThreats, getCoordinates, getETA, getPlayer, 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

necessaryRoads

protected java.util.Vector necessaryRoads

newPossibilities

protected java.util.Vector newPossibilities

longestRoadValue

protected int longestRoadValue

longestRoadPotential

protected int longestRoadPotential

numberOfNecessaryRoads

protected int numberOfNecessaryRoads
Constructor Detail

SOCPossibleRoad

public SOCPossibleRoad(SOCPlayer pl,
                       int co,
                       java.util.Vector nr)
constructor

Parameters:
pl - the owner
co - coordinates
nr - necessaryRoads

SOCPossibleRoad

public SOCPossibleRoad(SOCPossibleRoad pr)
copy constructor Note: This will not copy the vectors, just make empty ones

Parameters:
pr - the possible road to copy
Method Detail

getNecessaryRoads

public java.util.Vector getNecessaryRoads()
Returns:
the list of necessary roads

getNumberOfNecessaryRoads

public int getNumberOfNecessaryRoads()
Returns:
the minimum number of necessary roads

setNumberOfNecessaryRoads

public void setNumberOfNecessaryRoads(int num)
set the minimum number of necessary roads

Parameters:
num - the minimum number of necessary roads

getNewPossibilities

public java.util.Vector getNewPossibilities()
Returns:
the list of new possibilities

getLRValue

public int getLRValue()
Returns:
the longestRoadValue

getLRPotential

public int getLRPotential()
Returns:
the longestRoadPotential

addNecessaryRoad

public void addNecessaryRoad(SOCPossibleRoad rd)
add a possible road to the list of necessary roads

Parameters:
rd - the road

addNewPossibility

public void addNewPossibility(SOCPossiblePiece piece)
add a new possibility to the list

Parameters:
piece - the new possible piece

setLRValue

public void setLRValue(int value)
set the longest road value

Parameters:
value -

setLRPotential

public void setLRPotential(int value)
set the longest road potential

Parameters:
value -

JSettlers v1.0.6 API
Built ${date}