|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soc.robot.SOCBuildPossibility
public class SOCBuildPossibility
This represents a possible thing to build. It includes what and where to build. A score that represents how many VP this build is worth, and a list of other building possibilities that result from building this thing.
Field Summary | |
---|---|
(package private) int[] |
buildingSpeedup
|
(package private) boolean |
buyDevCard
|
(package private) java.util.Vector<SOCBuildPossibility> |
children
|
(package private) int |
devCardType
|
(package private) int |
eta
|
(package private) int |
freeRoads
|
(package private) SOCBuildPossibility |
parent
|
(package private) SOCPlayingPiece |
piece
|
(package private) SOCPlayer |
player
|
(package private) int |
priority
|
(package private) int |
score
|
Constructor Summary | |
---|---|
SOCBuildPossibility(int sc,
int[] bs,
int et,
int pr,
SOCPlayer pl)
this is a constructor for buying a dev card |
|
SOCBuildPossibility(int dt,
int sc,
int[] bs,
int et,
int pr,
SOCPlayer pl)
this is a constructor for PLAYING a dev card |
|
SOCBuildPossibility(SOCPlayingPiece pi,
int sc,
int[] bs,
int et,
int pr,
SOCPlayer pl)
this is a constructor |
|
SOCBuildPossibility(SOCPlayingPiece pi,
int sc,
int[] bs,
int et,
int pr,
SOCPlayer pl,
int fr)
this is a constructor for when you are using a road building card |
Method Summary | |
---|---|
void |
addChild(SOCBuildPossibility poss)
add a building possibility to the list of children |
int[] |
getBuildingSpeedup()
|
java.util.Vector<SOCBuildPossibility> |
getChildren()
|
int |
getDevCardType()
|
int |
getETA()
|
int |
getFreeRoads()
|
SOCBuildPossibility |
getParent()
|
SOCPlayingPiece |
getPiece()
|
SOCPlayer |
getPlayer()
|
int |
getPriority()
|
int |
getScore()
|
boolean |
isBuyDevCard()
|
boolean |
isPlayDevCard()
|
void |
setParent(SOCBuildPossibility par)
set the parent for this node |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
SOCPlayingPiece piece
boolean buyDevCard
int devCardType
int freeRoads
int score
int[] buildingSpeedup
int eta
int priority
SOCPlayer player
SOCBuildPossibility parent
java.util.Vector<SOCBuildPossibility> children
Constructor Detail |
---|
public SOCBuildPossibility(SOCPlayingPiece pi, int sc, int[] bs, int et, int pr, SOCPlayer pl)
pi
- what and where to buildsc
- how many VP this build is worthbs
- how our building speeds are affectedet
- how many turns until we can build thispr
- the prioritypl
- the player's state after the buildpublic SOCBuildPossibility(SOCPlayingPiece pi, int sc, int[] bs, int et, int pr, SOCPlayer pl, int fr)
pi
- what and where to buildsc
- how many VP this build is worthbs
- how our building speeds are affectedet
- how many turns until we can build thispr
- the prioritypl
- the player's state after the buildfr
- how many free roads are leftpublic SOCBuildPossibility(int sc, int[] bs, int et, int pr, SOCPlayer pl)
sc
- how many VP this build is worthbs
- how our building speeds are affectedet
- how many turns until we can build thispr
- the prioritypl
- the player's state after the buildpublic SOCBuildPossibility(int dt, int sc, int[] bs, int et, int pr, SOCPlayer pl)
dt
- which dev card to playsc
- how many VP this build is worthbs
- how our building speeds are affectedet
- how many turns until we can build thispr
- the prioritypl
- the player's state after the buildMethod Detail |
---|
public SOCPlayingPiece getPiece()
public boolean isBuyDevCard()
public boolean isPlayDevCard()
public int getDevCardType()
public int getFreeRoads()
public int getScore()
public int[] getBuildingSpeedup()
public int getETA()
public int getPriority()
public SOCPlayer getPlayer()
public java.util.Vector<SOCBuildPossibility> getChildren()
public SOCBuildPossibility getParent()
public void setParent(SOCBuildPossibility par)
par
- the parentpublic void addChild(SOCBuildPossibility poss)
poss
- the building possibilitypublic 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 |