|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsoc.util.NodeLenVis<T>
public class NodeLenVis<T>
State object for iteratively tracing longest road: A node, path length so far, visited nodes, and optionally the road or ship that led to this node.
| Field Summary | |
|---|---|
SOCRoad |
inboundRoad
the road or ship that lead us to this node, if len > 0 and SOCGame.hasSeaBoard. |
int |
len
the current length of the path we're going down |
int |
node
the coordinates of a node |
java.util.Vector<T> |
vis
nodes that we have visited along the way |
| Constructor Summary | |
|---|---|
NodeLenVis(int n,
int l,
java.util.Vector<T> v)
Creates a new NodeLenVis object. |
|
NodeLenVis(int n,
int l,
java.util.Vector<T> v,
SOCRoad rs)
Creates a new NodeLenVis object. |
|
| Method Summary | |
|---|---|
java.lang.String |
toString()
Get a string representation of this NodeLenVis. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int node
public int len
public java.util.Vector<T> vis
public SOCRoad inboundRoad
len > 0 and SOCGame.hasSeaBoard.
If len == 0, inboundRoad is null because we're just starting the segment.
| Constructor Detail |
|---|
public NodeLenVis(int n,
int l,
java.util.Vector<T> v)
n - Node coordinatel - Length so farv - Vector of nodes visited so far, as Integers
public NodeLenVis(int n,
int l,
java.util.Vector<T> v,
SOCRoad rs)
n - Node coordinatel - Length so farv - Vector of nodes visited so far, as Integersrs - Road or ship that led to this node, if l > 0;
only needed if SOCGame.hasSeaBoard| Method Detail |
|---|
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 | |||||||||