Package | Description |
---|---|
game | |
gui | |
student |
Modifier and Type | Method and Description |
---|---|
Node |
ScramState.currentNode()
Return the Node corresponding to Indiana's location in the graph.
|
Node |
GameState.currentNode() |
Node |
Edge.getDest()
Return destination of edge
|
Node |
Cavern.getEntrance()
Return the node corresponding to the entrance to the cavern.
|
Node |
ScramState.getExit()
Return the Node associated with the exit from the cavern.
|
Node |
GameState.getExit() |
Node |
Cavern.getNodeAt(int r,
int c)
Return the node at the given (r, c).
|
Node |
Edge.getOther(Node n)
Return the Node on this Edge that is not equal to n.
|
Node |
Edge.getSource()
Return the source of this edge.
|
Node |
Cavern.getTarget()
Return the target node in this cavern.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Node> |
ScramState.allNodes()
Return a collection containing all the nodes in the graph.
|
java.util.Collection<Node> |
GameState.allNodes() |
java.util.Set<Node> |
Cavern.getGraph()
Return the set of all nodes in the graph.
|
java.util.Set<Node> |
Node.getNeighbors()
Return an unmodifiable view of the Nodes neighboring this Node.
|
Modifier and Type | Method and Description |
---|---|
Edge |
Node.getEdge(Node q)
Return the Edge of this Node that connects to Node q.
|
Node |
Edge.getOther(Node n)
Return the Node on this Edge that is not equal to n.
|
void |
ScramState.moveTo(Node n)
Change Indiana's location to n.
|
void |
GameState.moveTo(Node n)
Attempt to move the explorer from the current position to
the Node n.
|
Constructor and Description |
---|
Edge(Node src,
Node dest,
int length)
Constructor: an edge from src to dest with length length.
|
Constructor and Description |
---|
Edge(Edge e,
java.util.Map<Node,Node> isomorphism)
Constructor: an edge that is isomporhpic to isomporhism.
|
Edge(Edge e,
java.util.Map<Node,Node> isomorphism)
Constructor: an edge that is isomporhpic to isomporhism.
|
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
MazePanel.getGoldIcon(Node n)
Return an icon for the gold on tile n, or null if no gold.
|
java.awt.image.BufferedImage |
GUI.getGoldIcon(Node n)
Return an icon for the gold on tile n,
or null otherwise.
|
void |
GUI.moveTo(Node dest)
Move the player on the GUI to destination dest.
|
void |
ExplorerSprite.moveTo(Node dst) |
void |
TileSelectPanel.selectNode(Node n)
Select node n on the GUI.
|
void |
GUI.selectNode(Node n)
Select node n on the GUI.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<Node> |
Paths.constructPath(Node end,
java.util.HashMap<Node,student.Paths.SFdata> nData)
Return the path from the start node to node end.
|
static java.util.List<Node> |
Paths.shortestPath(Node start,
Node end)
Return a list of the nodes on the shortest path from start to
end, or the empty list if a path does not exist.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<Node> |
Paths.constructPath(Node end,
java.util.HashMap<Node,student.Paths.SFdata> nData)
Return the path from the start node to node end.
|
static java.util.List<Node> |
Paths.shortestPath(Node start,
Node end)
Return a list of the nodes on the shortest path from start to
end, or the empty list if a path does not exist.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<Node> |
Paths.constructPath(Node end,
java.util.HashMap<Node,student.Paths.SFdata> nData)
Return the path from the start node to node end.
|
static int |
Paths.pathDistance(java.util.List<Node> path)
Return the sum of the weights of the edges on path path.
|
void |
Indiana.traverse(java.util.List<Node> p)
Indiana is in state scramState, standing on the first node of path p.
|