|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMaze
public class Maze
Field Summary | |
---|---|
int |
height
|
private int |
Vcnt
|
Vertex[] |
vertices
|
int |
width
|
Constructor Summary | |
---|---|
Maze(int width,
int height)
Initializes stuff |
Method Summary | |
---|---|
void |
dewall(Vertex v,
Vertex w)
Connect the two given vertices |
Vertex |
getEnd()
|
Vertex |
getStart()
|
void |
insertDisj(Vertex v)
Insert a single vertex |
void |
insertGraph(Vertex v,
Vertex w)
Insert a pair of connected vertices |
void |
reset()
Set all vertices to unknown |
void |
show()
Print the list of vertices and their connections |
boolean |
trace(java.util.Stack<Vertex> st,
Vertex s,
Vertex e)
Find out if there is a path between the two vertex params |
int |
V()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int Vcnt
public Vertex[] vertices
public int width
public int height
Constructor Detail |
---|
public Maze(int width, int height)
width
- Width of this mazeheight
- Height of this mazeMethod Detail |
---|
public void insertGraph(Vertex v, Vertex w)
v
- Vertex aw
- Vertex bpublic void show()
public void reset()
public boolean trace(java.util.Stack<Vertex> st, Vertex s, Vertex e)
st
- A stack used to store the paths
- The starting vertexe
- The ending vertex
public int V()
public Vertex getStart()
public Vertex getEnd()
public void insertDisj(Vertex v)
v
- The vertex to be insertedpublic void dewall(Vertex v, Vertex w)
v
- w
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |